X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/c4ca0bd3e94a7978772dadaa3b941ecc84741407..0e222da060151bc6aa6d5c82962e5e15cfa12070:/keyboard/altgr/index.inc.plp diff --git a/keyboard/altgr/index.inc.plp b/keyboard/altgr/index.inc.plp index e9179c6..67249ec 100644 --- a/keyboard/altgr/index.inc.plp +++ b/keyboard/altgr/index.inc.plp @@ -8,7 +8,7 @@ my $indexfile = "$dirbase/index"; Html({ title => "altgr keyboard cheat sheets", - version => '1.2', + version => '1.3', description => [ "Overview of alternate keyboard modes,", "offering extended Unicode characters if a modifier key", @@ -157,7 +157,8 @@ for my $inc (@incs) { print '', "\n\t"; for my $mode ($table->{mode} ? sort keys %{ $table->{mode} } : '') { print ''; - printf '', s/\s.*//r for $table->{def}{''}{$mode}[1] || (); + printf "", m/^(\S*)/ + for $mode && $table->{mode}{$mode} || (); for my $g (sort keys %{ $table->{inventory}{$mode} }) { printf ' %s', $g, $_/$most*100, $_, @@ -169,14 +170,19 @@ for my $inc (@incs) { say ''; } print "\t"; - print join ' ', map { $caticon{$_} // () } split m{/}, $table->{category} // ''; + print join ' ', map { $caticon{$_} // () } + split m{/}, $table->{category} // ''; say ''; if (my $keys = eval { my $keydata = Data("$dirbase/$inc.eng"); Shiar_Sheet::Keyboard->new($keydata) }) { - $keys->print_key('', $_, ($keys->{def}{''}{$_} // ['ni']) =~ s/ mode\S*//r) - for @sample; + for my $c (@sample) { + my $def = $keys->{def}{''}{$c} // []; + $def->[0] //= 'ni'; + $def->[0] =~ s/ mode\S*//; + $keys->print_key('', $c, $def); + } } say ''; }