keys: replace legends by generic function
[sheet.git] / keyboard.plp
index f1d5634c14952696a9c1c5f97a82e7aa4c5a4ef4..92c2aa292cd05eadfe3233c70de40548568aecb2 100644 (file)
@@ -13,7 +13,8 @@ Html({
 <h2>normal mode (default)</h2>
 
 <:
-use Shiar_Sheet::Keyboard 2;
+use Shiar_Sheet::Keyboard 2.07;
+
 my $usint = [
        [  'a' ..                                            'z'],
        [qw(Á B ¢ Ð É F G H Í J Œ Ø µ Ñ Ó Ö Ä ® § Þ Ú V Å X Ü Æ)],
@@ -36,20 +37,5 @@ my $keys = Shiar_Sheet::Keyboard->new({
 });
 $keys->map($get{map}) or undef $get{map};
 $keys->print_rows($get{rows}, [0]);
-:>
-<hr>
-
-<div class="help">
-       <div class="right">
-               <ul class="legend legend-set">
-               <li>keyboard <strong>map</strong> is
-                       <:= $get{map} ? 'set to ' : '' :><em><:= $keys->{map} :></em>
-               <li><strong>keys</strong> are
-                       <em><:= $showkeys ? 'always shown' : 'hidden if unassigned' :></em><:=
-                               !exists $get{keys} && ' by default' :>
-               <li>default <strong>style</strong> is
-                       <:= defined $get{style} && 'set to ' :><em><:= $style :></em>
-               </ul>
-       </div>
-</div>
+$keys->print_legends(\%get);