X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/c0ca5fd2ce5aaae5170e553b50a8e54e58368845..0f1264a15b66ff3682c5ebe2b9af8d2936a302f9:/Shiar_Sheet/Keyboard.pm diff --git a/Shiar_Sheet/Keyboard.pm b/Shiar_Sheet/Keyboard.pm index d4f78c8..1200003 100644 --- a/Shiar_Sheet/Keyboard.pm +++ b/Shiar_Sheet/Keyboard.pm @@ -6,7 +6,7 @@ use warnings; no warnings 'uninitialized'; # save some useless checks for more legible code use Carp; -our $VERSION = '2.09'; +our $VERSION = '2.10'; my @casedesc = (undef, qw/shift ctrl meta/, 'shift meta'); my @rowdesc = qw(numeric top home bottom); @@ -56,6 +56,7 @@ sub escapeclass { s/\+/_m/g; s/\[/_sbo/g; s/\]/_sbc/g; + s/\\/_b/g; s/^$/_/; return $_; } @@ -149,7 +150,7 @@ sub print_rows { ); my @modes = sort keys %{ $self->{def} }; - print ''."\n\n"; + printf '
'."\n\n", $self->{tableclass} // 'keys'; print_row: for (my $row = -1; $row <= $#{ $keyrows{$self->{map}} }; $row++) { @@ -206,7 +207,7 @@ sub print_legend { my ($class, $flags) = @_; say qq{\t\t
}; - printf("\t\t".'
%s'."\n\t\t\t".'
%s'."\n", + printf("\t\t".'
%s'."\n\t\t\t".'
%s
'."\n", $_, map { $self->escapedesc($_) } @{ $self->{flag}->{$_} || ["($_)", '...'] } ) for @$flags; say "\t\t
";