From: Mischa POSLAWSKY Date: Thu, 25 Jan 2024 22:30:48 +0000 (+0100) Subject: keyboard/altgr: olpc layout from xorg us symbols X-Git-Url: http://git.shiar.net/sheet.git/commitdiff_plain/17e692e15f94c64b89ec740856aa0b42087a675b keyboard/altgr: olpc layout from xorg us symbols Sufficiently complete latin alternative found in xkb presets but as described "a little different from the usual international layout". Representative image with sufficient detail from: https://commons.wikimedia.org/wiki/File:Fossdem_2009_olpc_001.jpg --- diff --git a/keyboard/altgr/olpc.eng.inc.pl b/keyboard/altgr/olpc.eng.inc.pl new file mode 100644 index 0000000..3884b9a --- /dev/null +++ b/keyboard/altgr/olpc.eng.inc.pl @@ -0,0 +1,97 @@ +use utf8; +use strict; +use warnings; +use Shiar_Sheet::KeyboardChars 'kbchars'; + +my %rows = ( + '1' => '¡', + '2' => '¬', + '3' => "\N{COMBINING GRAVE ACCENT}", + '4' => "\N{COMBINING ACUTE ACCENT}", + '5' => "\N{COMBINING BREVE}", + '6' => "\N{COMBINING RING ABOVE}", + '7' => "\N{COMBINING CIRCUMFLEX ACCENT}", + '8' => "\N{COMBINING CARON}", + '9' => "\N{COMBINING DOT ABOVE}", + '0' => "\N{COMBINING DIAERESIS}", + '-' => "\N{COMBINING MACRON}", + '=' => "\N{COMBINING TILDE}", + + 'q' => 'ω', + 'Q' => 'Ω', + 'w' => 'ø', + 'W' => 'Ø', + 'e' => 'œ', + 'E' => 'Œ', + 'r' => "\N{COMBINING CEDILLA}", + 't' => "\N{COMBINING BREVE BELOW}", + 'y' => "\N{COMBINING RING BELOW}", + 'u' => "\N{COMBINING CIRCUMFLEX ACCENT BELOW}", + 'i' => "\N{COMBINING CARON BELOW}", + 'o' => "\N{COMBINING DOT BELOW}", + 'p' => "\N{COMBINING DIAERESIS BELOW}", + '[' => "\N{COMBINING MACRON BELOW}", + ']' => "\N{COMBINING TILDE BELOW}", + + 'a' => 'æ', + 'A' => 'Æ', + 's' => 'ß', + 'S' => 'ẞ', + 'd' => 'ð', + 'D' => 'Ð', + 'f' => 'þ', + 'F' => 'Þ', + 'h' => '£', + 'j' => '€', + ';' => 'º', + ':' => 'ª', + "'" => '¤', + '\\'=> '§', + + 'c' => 'ç', + 'C' => 'Ç', + 'n' => 'ñ', + 'N' => 'Ñ', + 'm' => "\N{MICRO SIGN}", + ',' => '«', + '.' => '»', + '/' => '¿', +); + +my %shift = ( + qw[ ! 1 @ 2 # 3 $ 4 % 5 ^ 6 & 7 * 8 ( 9 ) 0 _ - + = ], + qw( { [ } ] " ' | \ < , > . ? / ` 3 ~ = ), + (map {uc, lc} qw[ r t y u i o p h j m ]), +); + +my $groups = kbchars(\%rows); +$groups->{flag}{ext} = ['alias', 'identical results from unshifted key']; +while (my ($alias, $target) = each %shift) { + # copy alias to shifted + $groups->{key}{$alias} = $groups->{key}{$target}; + $groups->{def}{''}{$alias} = $groups->{def}{''}{$target}.' ext'; +} +$groups->{def}{''}{$_} =~ s/g7/g4/ for qw( ! < > ? ); # similar punctuation + ++{ + %{ $groups }, + version => '1.0', + title => 'OLPC', + category => 'legacy/latin', + intro => join("\n", + "International US English developed for the OLPC project,", + 'providing mostly European', + 'Unicode characters while pressing AltGr,', + 'entirely different from the Windows', + 'or MacOS maps.', + ), + description => [ + "OLPC keyboard layout table", + "with the AltGr modifier key:", + "provides common western European letters and symbols,", + "and various combining accents above and below.", + ], + image => 'data/keyboard/thumb/olpc.jpg', + imagealt => 'AltGr on the OLPC XO Laptop', + moderows => '21-1', +}