Common support in Shiar_Sheet::FormatChar::kbchars() replaces some manual
definition manipulation; adding a couple in eurkey previously not worth the
effort.
use Text::Unidecode ();
use Shiar_Sheet::FormatChar;
use Text::Unidecode ();
use Shiar_Sheet::FormatChar;
our @EXPORT = qw( kbchars kbmodes );
my $uc = Shiar_Sheet::FormatChar->new;
our @EXPORT = qw( kbchars kbmodes );
my $uc = Shiar_Sheet::FormatChar->new;
$info{def}->{$lead}{$lead} = 'g1 mode'; # back
}
while (my ($k, $v) = each %{ $modes->{$lead} }) {
$info{def}->{$lead}{$lead} = 'g1 mode'; # back
}
while (my ($k, $v) = each %{ $modes->{$lead} }) {
+ my @class;
+ if (ref $v eq 'SCALAR') {
+ my ($reflead, $ref) = split /(.)$/, ${$v};
+ $v = $modes->{$reflead}->{$ref};
+ @class = 'ext';
+ }
my ($glyph, $title) = $uc->glyph_html($v);
$info{key}{$lead.$k} = join "\n", $glyph, $title;
my $c = $k =~ s/\A[+^](?=.)//r; # trim modifier indicator
my ($glyph, $title) = $uc->glyph_html($v);
$info{key}{$lead.$k} = join "\n", $glyph, $title;
my $c = $k =~ s/\A[+^](?=.)//r; # trim modifier indicator
!defined $v || $c eq $v ? 'no' # identical
: $v =~ /\A\p{Mn}+\z/ ? 'g9' # combining accent
: NFKD($v) =~ /\A\Q$c\E\p{Mn}*\z/ ? 'g2' # decomposed equivalent
!defined $v || $c eq $v ? 'no' # identical
: $v =~ /\A\p{Mn}+\z/ ? 'g9' # combining accent
: NFKD($v) =~ /\A\Q$c\E\p{Mn}*\z/ ? 'g2' # decomposed equivalent
: $v =~ /^\p{Latin}/ ? 'g5' # latin script
: 'g6'
);
: $v =~ /^\p{Latin}/ ? 'g5' # latin script
: 'g6'
);
- $g{$class} = 1 unless $class eq 'no';
- $info{def}{$lead}{$k} //= $class;
+ $g{$_} = 1 for grep { $_ ne 'no' } @class;
+ $info{def}{$lead}{$k} //= join ' ', @class;
g7 => ['punctuation', "(punctuation) mark"],
g8 => ['mark', "modifier letter or mark (spacing diacritic)"],
g9 => ['combining', "diacritical mark to be combined with a following character"],
g7 => ['punctuation', "(punctuation) mark"],
g8 => ['mark', "modifier letter or mark (spacing diacritic)"],
g9 => ['combining', "diacritical mark to be combined with a following character"],
+ ext => ['alias', 'alternative with identical results as something else'],
}}{keys %g}};
return \%info;
}
}}{keys %g}};
return \%info;
}
']' => "}",
'^' => "\N{COMBINING MACRON}",
'_' => "\xB1",
']' => "}",
'^' => "\N{COMBINING MACRON}",
'_' => "\xB1",
'A' => "\x{2190}",
'a' => "\xE6",
'B' => "\x{20bf}",
'A' => "\x{2190}",
'a' => "\xE6",
'B' => "\x{20bf}",
'd' => "\x{394}",
'D' => "\x{2192}",
'e' => "\x{20AC}",
'd' => "\x{394}",
'D' => "\x{2192}",
'e' => "\x{20AC}",
'f' => "\x{192}",
'F' => "\x{191}",
#'g' => "g",
'f' => "\x{192}",
'F' => "\x{191}",
#'g' => "g",
'x' => "\xD7",
'X' => "\xF7",
'y' => "\xA5",
'x' => "\xD7",
'X' => "\xF7",
'y' => "\xA5",
'z' => "\xA7",
'Z' => "\xB6",
'{' => "\xAB",
'z' => "\xA7",
'Z' => "\xB6",
'{' => "\xAB",
';' => "\xA1", # unshifted ! at m
);
';' => "\xA1", # unshifted ! at m
);
-my $groups = kbchars(\%rows);
-$groups->{def}{''}{$_} .= ' ext' for qw( ` E Y );
-
version => '1.0',
title => 'Drix',
category => 'latin/xorg',
version => '1.0',
title => 'Drix',
category => 'latin/xorg',
# greek
'm' => {
'a' => 'α',
# greek
'm' => {
'a' => 'α',
'g' => 'γ',
'd' => 'δ',
'e' => 'ε',
'g' => 'γ',
'd' => 'δ',
'e' => 'ε',
'f' => 'φ',
'c' => 'χ',
'w' => 'ψ',
'f' => 'φ',
'c' => 'χ',
'w' => 'ψ',
+ 'q' => 'ω',
+
+ # aliases
+ 'v' => \'mb',
+ 'u' => \'mq',
qw( { [ } ] " ' | \ < , > . ? / ` 3 ~ = ),
(map {uc, lc} qw[ r t y u i o p h j m ]),
);
qw( { [ } ] " ' | \ < , > . ? / ` 3 ~ = ),
(map {uc, lc} qw[ r t y u i o p h j m ]),
);
-$rows{$_} = $rows{ $shift{$_} } for keys %shift; # alias shifted
+$rows{$_} = \$shift{$_} for keys %shift; # alias shifted
my $groups = kbchars(\%rows);
$groups->{flag}{ext} = ['alias', 'identical results from unshifted key'];
my $groups = kbchars(\%rows);
$groups->{flag}{ext} = ['alias', 'identical results from unshifted key'];
-$groups->{def}{''}{$_} .= ' ext' for keys %shift; # mark aliases