keyboard/altgr: system categories indicated on index
[sheet.git] / keyboard / altgr / index.inc.plp
index 0bb7774112193b414cab1a65531cf966ccc66a9b..7966426ed2ee2ec0c9b5f15dee1b3a7d4f1a65bb 100644 (file)
@@ -1,6 +1,7 @@
 <: # included from keyboard.plp
 use 5.014;
 use warnings;
+use utf8;
 
 my @incs = glob 'keyboard/altgr/*.eng.inc.pl';
 
@@ -96,10 +97,17 @@ my @sample = split /(?<!\+)/, $get{sample} // 'asSci1!+1';
 require Shiar_Sheet::Keyboard;
 use List::Util qw( uniq max );
 
+my %caticon = (
+       legacy  => "\N{TOP HAT}",
+       windows => "\x{1FA9F}", # \N{WINDOW}
+       macos   => "\N{RED APPLE}",
+       xorg    => "\N{PENGUIN}",
+);
+
 printf '<section class="%s">', @sample ? 'section' : 'gallery';
 if (@sample) {
        print '<table class="big keys cmp">';
-       print '<thead><tr><th>';
+       print '<thead><tr><th colspan=2>';
        print "<th>$_" for @sample;
        say '</tr></thead>';
 }
@@ -140,6 +148,9 @@ for my $inc (sort {
                        }
                        say '</span>';
                }
+               print "\t<th>";
+               print join '<br>', map { $caticon{$_} // () } split m{/}, $keys->{category};
+               say '';
                $keys->print_key('', $_, $keys->{def}{''}{$_} // 'ni') for @sample;
                say '</tr>';
        }