From: Mischa POSLAWSKY Date: Sun, 3 Dec 2023 17:40:38 +0000 (+0100) Subject: keyboard: omit legends of unused diacritic classes X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/d2de36b8cc74f75b168981c233d31c59f24d3ab0 keyboard: omit legends of unused diacritic classes --- diff --git a/keyboard.eng.inc.pl b/keyboard.eng.inc.pl index 1f372e3..378acdc 100644 --- a/keyboard.eng.inc.pl +++ b/keyboard.eng.inc.pl @@ -1,6 +1,7 @@ use Unicode::Normalize qw( NFKD ); use Text::Unidecode qw( unidecode ); +my %g; # present group classes { rows => [0, 1], def => { @@ -17,6 +18,7 @@ use Text::Unidecode qw( unidecode ); : $v =~ /^\p{Latin}/ ? 5 # latin script : 6 ); + $g{$class} = 1; $_ => "g$class" } keys %rows }, @@ -29,7 +31,9 @@ use Text::Unidecode qw( unidecode ); g5 => ['latin', "a different (accented) latin letter"], g6 => ['symbol', "other character not directly deducible from key"], g7 => ['punctuation', "(punctuation) mark"], + !$g{9} ? () : ( g8 => ['mark', "modifier letter or mark (spacing diacritic)"], g9 => ['combining', "diacritical mark to be combined with a following character"], + ), }, }