X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/dfb97641f69972c016320553556086d5a66e7606..c4ca0bd3e94a7978772dadaa3b941ecc84741407:/keyboard/altgr/index.inc.pl diff --git a/keyboard/altgr/index.inc.pl b/keyboard/altgr/index.inc.pl index 47a0b7a..30783f7 100644 --- a/keyboard/altgr/index.inc.pl +++ b/keyboard/altgr/index.inc.pl @@ -1,9 +1,26 @@ use strict; -+{ +use warnings; + +my %cat = ( default => [qw( euro latin science graph )], euro => [qw( windows ukext macos macos-abc weur eurkey msx )], latin => [qw( ipa olpc boyeg drix )], science => [qw( symbolics apl spacecadet )], graph => [qw( unigraph emojiworks )], extra => [qw( msx-graph p8scii zoo )], +); + +for my $name (map {@{$_}} values %cat) { + my $keys = do "keyboard/altgr/$name.eng.inc.pl" or next; + my %row = %{$keys}{qw( title category flag mode image imagealt )}; + $cat{$name} = \%row; + + $keys->{mode} //= {'' => undef}; + for my $mode (keys %{ $keys->{mode} }) { + $row{def}{''}{$_} = $keys->{def}{''}{$_} for $mode || (); + $row{inventory}{$mode}{$_}++ for grep { /^g[2-9]/ } map { s/ (?!ext).*//r } map {$_->[0]} + values %{ $keys->{def}{$mode} }; + } } + +\%cat