X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/fe3830a0e28e28ea18335cc81af2faac447fc69a..c0ca5fd2ce5aaae5170e553b50a8e54e58368845:/keyboard.plp diff --git a/keyboard.plp b/keyboard.plp index 36ccaca..ea62b5a 100644 --- a/keyboard.plp +++ b/keyboard.plp @@ -1,9 +1,10 @@ <(common.inc.plp)><: -my $mode = lc($Request || 'keyboard'); +my $mode = lc($Request || 'altgr'); my $include = "$mode.eng"; my $info = eval { Data($include) } || {}; +warn "error in $include: ", @{$@} if ref $@; $mode = $info->{title} // $mode; Html({ @@ -33,5 +34,33 @@ use Shiar_Sheet::Keyboard 2.08; my $keys = Shiar_Sheet::Keyboard->new($info); $keys->map($get{map}) or undef $get{map}; $keys->print_rows($get{rows}, $info->{rows}); -$keys->print_legends(\%get); +{ + say "
\n"; + say '
'; + + use List::MoreUtils qw( part ); + my @gflags = part {/^g\d/} sort keys %{ $keys->{flag} }; + + say "\t", '
'; + $keys->print_legend('legend-types', $gflags[1]); + say "\t
\n"; + + say "\t", '
'; + $keys->print_legend('legend-options', $gflags[0]); + say ''; + + say "\t\t", '"; + say "\t
\n"; + say "
\n"; +}