keyboard/altgr: classify lookalike symbols as transliterated
[sheet.git] / Shiar_Sheet / KeyboardChars.pm
index 6afd7dce4cf1b7619d9aff5b9ab0e784692fc812..77be1209c6f5078125b6d65abe09296883f0b6b1 100644 (file)
@@ -8,7 +8,7 @@ use Unicode::Normalize qw( NFKD );
 use Text::Unidecode qw( unidecode );
 use Shiar_Sheet::FormatChar;
 
-our $VERSION = '1.00';
+our $VERSION = '1.01';
 our @EXPORT = qw( kbchars kbmodes );
 
 my $uc = Shiar_Sheet::FormatChar->new;
@@ -36,10 +36,10 @@ sub kbmodes ($modes) {
                        my $class = 'g'.(
                                  !defined $v || $c eq $v ? 1 # identical
                                : $v =~ /\A\p{Mn}+\z/ ? 9 # combining accent
-                               : $v =~ /\A[\p{Sk}\p{Lm}]+\z/ ? 8 # modifier symbol
-                               : $v =~ /\A[\pM\pP]+\z/ ? 7 # mark
                                : NFKD($v) =~ /\Q$c/ ? 2 # decomposed equivalent
                                : unidecode($v) =~ /\Q$c\E+/i ? 4 # transliterated
+                               : $v =~ /\A[\p{Sk}\p{Lm}]+\z/ ? 8 # modifier symbol
+                               : $v =~ /\A[\pM\pP]+\z/ ? 7 # mark
                                : $v =~ /^\p{Latin}/ ? 5 # latin script
                                : 6
                        );