From d2de36b8cc74f75b168981c233d31c59f24d3ab0 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sun, 3 Dec 2023 18:40:38 +0100 Subject: [PATCH] keyboard: omit legends of unused diacritic classes --- keyboard.eng.inc.pl | 4 ++++ 1 file changed, 4 insertions(+) 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"], + ), }, } -- 2.30.0