Move apl symbol exceptions to the shared lookup function.
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 ⌿ / ⍟ (*)
+);
+
+sub unidecode {
+ return $unaccent{$_[0]} // Text::Unidecode::unidecode($_[0]);
+}
+
sub kbchars ($rows) {
return kbmodes({'' => $rows});
}
);
my $groups = kbchars(\%rows);
-$groups->{def}{''}{$_} = 'g4' for split //,'weEriIoOa/*'; # lookalikes
$groups->{def}{''}{$_} .= ' ext' for keys %dyalogx;
$groups->{flag}{ext} = ['extended', 'optional operators not available in all variants'];