From c72d9fce2dae5b7d1e443f30b1abfddb352eabde Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Tue, 5 Mar 2024 18:14:27 +0100 Subject: [PATCH] keyboard/altgr: ignore partial decomposition as accented flag MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Prevent fractions such as ¾ (3/4) from matching either 3 or 4 in eurkey and msx-graph. No changes otherwise. --- Shiar_Sheet/KeyboardChars.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Shiar_Sheet/KeyboardChars.pm b/Shiar_Sheet/KeyboardChars.pm index 0c5b5e5..d0e84c8 100644 --- a/Shiar_Sheet/KeyboardChars.pm +++ b/Shiar_Sheet/KeyboardChars.pm @@ -55,7 +55,7 @@ sub kbmodes ($modes) { my $class = ( !defined $v || $c eq $v ? 'no' # identical : $v =~ /\A\p{Mn}+\z/ ? 'g9' # combining accent - : NFKD($v) =~ /\Q$c/ ? 'g2' # decomposed equivalent + : NFKD($v) =~ /\A\Q$c\E\p{Mn}*\z/ ? 'g2' # decomposed equivalent : unidecode($v) =~ /\Q$c\E+/i ? 'g4' # transliterated : $v =~ /\A[\p{Sk}\p{Lm}]+\z/ ? 'g8' # modifier symbol : $v =~ /\A[\pM\pP]+\z/ ? 'g7' # mark -- 2.30.0