X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/44e16a2ff933556dd5db83bdbf2315d61ce0640f..0f1264a15b66ff3682c5ebe2b9af8d2936a302f9:/Shiar_Sheet/KeyboardChars.pm diff --git a/Shiar_Sheet/KeyboardChars.pm b/Shiar_Sheet/KeyboardChars.pm index 77be120..4a28f11 100644 --- a/Shiar_Sheet/KeyboardChars.pm +++ b/Shiar_Sheet/KeyboardChars.pm @@ -2,17 +2,29 @@ package Shiar_Sheet::KeyboardChars; use 5.020; use warnings; +use utf8; use experimental 'signatures'; use parent 'Exporter'; use Unicode::Normalize qw( NFKD ); -use Text::Unidecode qw( unidecode ); +use Text::Unidecode (); use Shiar_Sheet::FormatChar; -our $VERSION = '1.01'; +our $VERSION = '1.02'; 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 + ɸ PF ʎ yl ɔ co Ɔ CO ɛ 3E ƣ q Ƣ Q ∀ A ∃ E ∪ u ∩ n ≠ != + ≈ =~ ∅ /0 ∘ o ⋅ . ∫ s ≝ =d ″ " ≤ < ≥ > √ rV ∛ 3V ∜ 4V +); + +sub unidecode { + return $unaccent{$_[0]} // Text::Unidecode::unidecode($_[0]); +} + sub kbchars ($rows) { return kbmodes({'' => $rows}); } @@ -20,6 +32,7 @@ sub kbchars ($rows) { sub kbmodes ($modes) { my %g; # present group classes my %info = ( + tableclass => 'keys big', rows => [1, 0], ); for my $lead (keys %{$modes}) {