From aed75298b5098f135ff8159c96775e1ab5e2dad0 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sat, 10 Feb 2024 00:20:33 +0100 Subject: [PATCH] keyboard/altgr: expected greek alphabet transliteration MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Hardcode a mostly phonetic glyph map, overriding default letter names so eg theta Θ matches Q not H (recognising spacecadet instead of eurkey). Fixes spacecadet where everything is at expected keys except for ϑ and ς, and eurkey allowing υ/φ/χ but not θ. --- Shiar_Sheet/KeyboardChars.pm | 9 +++++++-- keyboard/altgr/eurkey.eng.inc.pl | 2 +- keyboard/altgr/spacecadet.eng.inc.pl | 9 +++++++-- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Shiar_Sheet/KeyboardChars.pm b/Shiar_Sheet/KeyboardChars.pm index 4a28f11..d406459 100644 --- a/Shiar_Sheet/KeyboardChars.pm +++ b/Shiar_Sheet/KeyboardChars.pm @@ -9,16 +9,21 @@ use Unicode::Normalize qw( NFKD ); use Text::Unidecode (); use Shiar_Sheet::FormatChar; -our $VERSION = '1.02'; +our $VERSION = '1.03'; our @EXPORT = qw( kbchars kbmodes ); my $uc = Shiar_Sheet::FormatChar->new; our %unaccent = qw( ⍺ a ⍵ w ∊ E ⍷ E ⍴ r ⍳ i ⍸ i ○ O ⍥ O ⌿ / ⍟ (*) ⊕ (+) - Ʊ U ǝ e Ǝ E ʌ v χ X ɥ h ʘ O ɰ mw ɯ mw Ɯ MW ə @ae Ə @AE + Ʊ U ǝ e Ǝ E ʌ v ɥ h ʘ O ɰ mw ɯ mw Ɯ MW ə @ae Ə @AE ɸ PF ʎ yl ɔ co Ɔ CO ɛ 3E ƣ q Ƣ Q ∀ A ∃ E ∪ u ∩ n ≠ != ≈ =~ ∅ /0 ∘ o ⋅ . ∫ s ≝ =d ″ " ≤ < ≥ > √ rV ∛ 3V ∜ 4V + Α A Β B Γ G Δ D Ε E Ζ Z Η H Θ CQ Ι I Κ K Λ L Μ M + Ν N Ξ X Ο O Π P Ρ R Σ S Τ T Υ YU Φ F Χ CX Ψ Y Ω W + α a β b γ g δ d ε e ζ z η h θ cq ι i κ k λ l μ m + ν n ξ x ο o π p ρ r σ s τ t υ yu φ f χ cx ψ y ω w + ς sc ϑ cq µ mu ); sub unidecode { diff --git a/keyboard/altgr/eurkey.eng.inc.pl b/keyboard/altgr/eurkey.eng.inc.pl index a0b9ea2..7220851 100644 --- a/keyboard/altgr/eurkey.eng.inc.pl +++ b/keyboard/altgr/eurkey.eng.inc.pl @@ -277,7 +277,7 @@ my %rows = ( 'M' => '√ maths prefix ⌥M', $presymbol => "$rows{''}{$presymbol} symbol prefix ⌥$presymbol", }, - version => '1.0', + version => '1.1', title => 'EurKEY', category => 'latin', intro => join("\n", diff --git a/keyboard/altgr/spacecadet.eng.inc.pl b/keyboard/altgr/spacecadet.eng.inc.pl index 75e2948..12c2fbe 100644 --- a/keyboard/altgr/spacecadet.eng.inc.pl +++ b/keyboard/altgr/spacecadet.eng.inc.pl @@ -89,9 +89,14 @@ my %rows = ( '+/' => '∫', ); +my $groups = kbchars(\%rows); +$rows{$_} =~ /\A\p{Greek}/ and $groups->{def}{''}{$_} =~ s/g6/g5/ for map {"+$_"} 'a'..'z'; +$groups->{flag}{g4} = ['similar', 'transliterates or transcribes an expected letter']; +$groups->{flag}{g5} = ['greek', 'different Greek letters or symbols']; + +{ - %{ kbchars(\%rows) }, - version => '1.0', + %{$groups}, + version => '1.1', title => 'Space Cadet', category => 'legacy', intro => join("\n", -- 2.30.0