keyboard: fix empty key titles
[sheet.git] / keyboard.plp
index ac9df32e2edb716ed7aa0a2b347cc2c52a45aee3..f1d5634c14952696a9c1c5f97a82e7aa4c5a4ef4 100644 (file)
@@ -3,7 +3,7 @@
 Html({
        title => 'keyboard cheat sheet',
        version => '1.0',
-       stylesheet => [qw'light dark circus mono red terse'],
+       stylesheet => [qw( light dark circus mono red )],
        keys => 1,
 });
 
@@ -12,17 +12,7 @@ Html({
 
 <h2>normal mode (default)</h2>
 
-<ul id="rows">
-
-<li class="row">
-       <ul class="keys omni">
-       <li class="mo chr27" onclick="setmode()"><b>Esc</b> normal mode
-               <!-- not as static anymore, but never bothered; just see ^[ -->
-       </ul>
-</li>
-
 <:
-our %sign;
 use Shiar_Sheet::Keyboard 2;
 my $usint = [
        [  'a' ..                                            'z'],
@@ -35,48 +25,22 @@ 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};
 $keys->print_rows($get{rows}, [0]);
 :>
-</ul>
-
 <hr>
 
 <div class="help">
-       <div class="left">
-               <dl class="legend legend-types">
-               <dt class="ci">info
-                       <dd>Info command: shows/does something without altering anything.
-               <dt class="pm">motion
-               <dt class="po">positioning
-                       <dd>Other movement (jumps, window (re)positioning).
-               <dt class="co">command
-                       <dd>Direct action command.
-               <dt class="mi">ins mode
-                       <dd>Enters Insert or Replace mode.
-               <dt class="mo">mode
-                       <dd>Enters a different mode.
-               <dt class="mv">vis mode
-                       <dd>Enters Visual or Select mode.
-               <dt class="me">key cmd
-                       <dd>Additional key commands (click for overview).
-               </dl>
-       </div>
-
        <div class="right">
-               <dl class="legend legend-options">
-               </dl>
-
                <ul class="legend legend-set">
                <li>keyboard <strong>map</strong> is
                        <:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>