X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/a84b651b70f484379de8ac84a2abac91e59c1a6e..8c1a0b561ab0ebdbc88d801ff07ebba90999e1c0:/Shiar_Sheet/Keyboard.pm diff --git a/Shiar_Sheet/Keyboard.pm b/Shiar_Sheet/Keyboard.pm index f56437f..d8d8274 100644 --- a/Shiar_Sheet/Keyboard.pm +++ b/Shiar_Sheet/Keyboard.pm @@ -5,7 +5,7 @@ use warnings; no warnings 'uninitialized'; # save some useless checks for more legible code use Carp; -our $VERSION = '1.00'; +our $VERSION = '1.01'; my @casedesc = qw(ctrl shift); my @rowdesc = qw(numeric top home bottom); @@ -84,7 +84,7 @@ sub print_key { # $key = $keytrans{$key} if defined $keytrans{$key}; my $keytxt = $mode . escapehtml($key) if $key ne '^0'; - $keytxt .= $self->{sign}->{arg} while $flags =~ s/ ?\barg\b//; # argument + $keytxt .= $self->{sign}->{$1} while $flags =~ s/(?:^| )(arg[a-ln-z]?)\b//; # arguments $keytxt .= "$self->{sign}->{motion}" if $flags =~ s/ ?\bargm\b//; # motion argument $keytxt =~ s{\^(?=.)}{^}; # element around ctrl-identifier my $onclick = $flags =~ s/ ?\bmode(\S*)// && defined $self->{keys}{$1} && sprintf( @@ -163,13 +163,13 @@ Shiar_Sheet::Keyboard - Output HTML for key sheets =head1 DESCRIPTION -Used by http://sheet.shiar.net to display keyboard sheets. +Used by http://sheet.shiar.nl to display keyboard sheets. Assumes specific stylesheets and javascript from this site, so probably not of much use elsewhere. =head1 AUTHOR -Mischa POSLAWSKY +Mischa POSLAWSKY =head1 LICENSE