-my $usint = [
- [ 'a' .. 'z'],
- [qw(Á B ¢ Ð É F G H Í J Œ Ø µ Ñ Ó Ö Ä ® § Þ Ú V Å X Ü Æ)],
- [qw(á b © ð é f g h í j œ ø µ ñ ó ö ä ® ß þ ú v å x ü æ)],
- [qw(Å ı Ç ð ´ ̉ ˝ ̣ ˆ ½ Þ ¾ ˜ Ø ∏ Œ ‰ / ˇ ¨ ◊ „ ˛ ¼ ¸)],
- [qw(å ∫ ç ∂ ´ ƒ © ˙ ^ ∆ ° ¬ µ ~ ø π œ ® ß † ¨ √ ∑ ≈ ¥ Ω)],
-];
-
-my $keys = Shiar_Sheet::Keyboard->new({
- def => {
- '' => {
- map {
- my $c = $_;
- my @row = map { $usint->[$_]->[$c] } 0 .. 2;
- my $class = (
- !defined $row[2] || $row[0] eq $row[2] ? 1 # identical
- : NFKD($row[2]) =~ $row[0] ? 2 # equivalent
- : $row[2] =~ /^\p{Latin}/ ? 3 # latin
- : 4
- );
- $row[0] => "g$class"
- } 0 .. $#{ $usint->[0] }
- },
- },
- key => {
- map {
- $usint->[0]->[$_] => "$usint->[1]->[$_]<br>$usint->[2]->[$_]"
- } 0 .. $#{ $usint->[0] }
- },
- flag => {
- g1 => ['unaltered'],
- g2 => ['accented'],
- g3 => ['latin'],
- g4 => ['other'],
- },
-});