keyboard: fix empty key titles
[sheet.git] / keyboard.plp
index eef05efc8fcdadd23430e9ab680ddc8bf7f2c9ce..f1d5634c14952696a9c1c5f97a82e7aa4c5a4ef4 100644 (file)
@@ -25,14 +25,13 @@ my $usint = [
 my $keys = Shiar_Sheet::Keyboard->new({
        def => {
                '' => {
-                       map { $_ => [''] } @{ $usint->[0] }
+                       map { $_ => '' } @{ $usint->[0] }
                },
        },
        key => {
                map {
-                       my $i = ord($_) - ord('a');
-                       $_ => ["$usint->[1]->[$i]<br>$usint->[2]->[$i]"]
-               } 'a'..'z'
+                       $usint->[0]->[$_] => "$usint->[1]->[$_]<br>$usint->[2]->[$_]"
+               } 0 .. $#{ $usint->[0] }
        },
 });
 $keys->map($get{map}) or undef $get{map};