X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/d018b1fcc5e1035c2302b2417480003aca64fa5e..be9d4788815fac719e6aab8cdcf7ac35183eea7c:/Shiar_Sheet/Keyboard.pm
diff --git a/Shiar_Sheet/Keyboard.pm b/Shiar_Sheet/Keyboard.pm
index 846a2a2..98c5a40 100644
--- a/Shiar_Sheet/Keyboard.pm
+++ b/Shiar_Sheet/Keyboard.pm
@@ -14,12 +14,12 @@ my %keyrows = do 'keys.inc.pl';
# add first two cases of each row again with each char prepended by + (alt)
push @$_, map { [map {"+$_"} @$_] } @$_[0,1] for map {@$_} values %keyrows;
-my %keytrans = qw(
- ^@ NUL ^a SOH ^b STX ^c ETX ^d EOT ^e ENQ ^f ACK ^g BEL
- ^h BS ^i tab ^j LF ^k VT ^l FF ^m CR ^n SO ^o SI
- ^p DLE ^q DC1 ^r DC2 ^s DC3 ^t DC4 ^u NAK ^v SYN ^w ETB
- ^x CAN ^y EM ^z SUB ^[ ESC ^\ FS ^] GS ^^ RS ^_ US
- ^? DEL
+my %keytrans = (
+ '^h' => "\x{232B}", # BS
+ '^i' => "\x{21E5}", # TAB
+ '^m' => "\x{21B5}", # CR
+ '^?' => "\x{2326}", # DEL
+ '^[' => "\x{238B}", # ESC
);
sub new {
@@ -95,7 +95,7 @@ sub print_letter {
return if $key eq '^0';
return 'Esc' if $key eq "\e";
-# return $keytrans{$key} if defined $keytrans{$key};
+ return $keytrans{$key} if defined $keytrans{$key};
my $html = $self->{def}{$mode}{lead} . escapehtml($key);
$html =~ s{\^(?=.)}{^}; # element around ctrl-identifier
$html =~ s{\+(?=.)}{+}; # meta