X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/2e8c1e3cc39cc1c6e4b858242d2a3a39481b9640..da56f674f1b9ed64adbcae060113733b023fa5c9:/keyboard/altgr/index.inc.plp
diff --git a/keyboard/altgr/index.inc.plp b/keyboard/altgr/index.inc.plp
index 74c53dd..c6accc7 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",
@@ -111,7 +111,9 @@ img {
:>
Extended keyboards
-Overview of available key layouts with AltGr or similar modifier keys.
+Overview of available key layouts with AltGr or similar modifier keys.
+Also see digraphs for compose key combinations.
+
<:
my $idx = Data($indexfile);
@@ -120,6 +122,7 @@ push @incs, @{ $idx->{$_} } for @{ $idx->{default} };
my @sample = split /(?VERSION(3.00);
use List::Util qw( uniq max sum );
my %caticon = (
@@ -136,7 +139,9 @@ if (@sample) {
print "$_" for @sample;
say '';
}
-my $most = max(map { sum values %{ $_->{inventory}{''} } } %{$idx}{@incs});
+my $most = max(
+ map { sum values %{$_} } map { $_->{inventory}{''} } @{$idx}{@incs}
+);
for my $inc (@incs) {
my $table = $idx->{$inc};
print @sample ? ' | ' : '';
@@ -156,7 +161,8 @@ for my $inc (@incs) {
print '', "\n\t";
for my $mode ($table->{mode} ? sort keys %{ $table->{mode} } : '') {
print '';
- printf '', s/\s.*//r for $table->{key}{$mode} || ();
+ printf "", m/^(\S*)/
+ for $mode && $table->{mode}{$mode} || ();
for my $g (sort keys %{ $table->{inventory}{$mode} }) {
printf ' %s',
$g, $_/$most*100, $_,
@@ -168,14 +174,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 ' | |
';
}