From 55acbc4a59dc3f916b58babc675d223a6d4470ee Mon Sep 17 00:00:00 2001 From: Walter Bender Date: Sat, 20 Apr 2013 12:02:25 -0400 Subject: [PATCH] add support for the OLPC mechanical non-membrane keyboard Organization: Sugar Labs Foundation Patch updated against current tree. > From: Paul Fox > Date: Tue, 20 Jul 2010 16:22:40 -0400 > Subject: [PATCH] add support for the OLPC "mechanical" (non-membrane) keyboard > model(s). to aid in this, add keycodes/olpc with aliases to avoid needing to > use BKSL and TLDE, which don't appear anywhere near their "traditional" > position on the olpcm mechanical keyboards. --- keycodes/Makefile.am | 1 + keycodes/olpc | 23 ++++++++++++++++++++ rules/base.ml_c.part | 3 ++- rules/base.ml_s.part | 2 ++ rules/evdev.m_k.part | 2 ++ symbols/es | 47 +++++++++++++++++++++++++++++++++++++++-- symbols/olpc | 8 +++---- symbols/us | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++- 8 files changed, 137 insertions(+), 8 deletions(-) create mode 100644 keycodes/olpc diff --git a/keycodes/Makefile.am b/keycodes/Makefile.am index 9c5a386..78a0355 100644 --- a/keycodes/Makefile.am +++ b/keycodes/Makefile.am @@ -12,6 +12,7 @@ fujitsu \ hp \ ibm \ macintosh \ +olpc \ sony \ sun \ xfree86 \ diff --git a/keycodes/olpc b/keycodes/olpc new file mode 100644 index 0000000..0d7724b --- /dev/null +++ b/keycodes/olpc @@ -0,0 +1,23 @@ + +// OLPC's mechanical keyboard moves several keys to the AA row. make +// them easier to write symbol files naturally. + +// see http://wiki.laptop.org/go/OLPC_English_Non-membrane_Keyboard +// and http://wiki.laptop.org/go/OLPC_Spanish_Non-membrane_Keyboard + +default +xkb_keycodes "olpc" { + + alias = ; // many OLPC keyboards don't put tilde there + alias = ; // on model olpc, physical position of BKSL + +}; + +default +xkb_keycodes "olpcm" { + + alias = ; // on model olpcm, new physical position of BKSL + alias = ; // on model olpcm, new physical position of =+ + alias = ; // on model olpcm, new physical position of '" + +}; diff --git a/rules/base.ml_c.part b/rules/base.ml_c.part index ec8f022..793ebe1 100644 --- a/rules/base.ml_c.part +++ b/rules/base.ml_c.part @@ -1,4 +1,5 @@ pc98 nec_vndr/jp = pc98(basic) * jp = complete+japan - olpc * = olpc + olpc * = olpc + olpcm * = olpc * * = complete diff --git a/rules/base.ml_s.part b/rules/base.ml_s.part index 552693d..76c05d2 100644 --- a/rules/base.ml_s.part +++ b/rules/base.ml_s.part @@ -24,6 +24,8 @@ nokiasu8w * = nokia_vndr/su-8w(%l) olpc $olpclayouts = olpc+%l%(m) olpc * = olpc+%l%(v) + olpcm $olpclayouts = olpc+%l%(m) + olpcm * = olpc+%l%(v) $thinkpads br = pc+br(thinkpad) sl-c3x00 * = pc+sharp_vndr/sl-c3x00(basic) ws003sh * = pc+sharp_vndr/ws003sh(basic) diff --git a/rules/evdev.m_k.part b/rules/evdev.m_k.part index 8106754..783326b 100644 --- a/rules/evdev.m_k.part +++ b/rules/evdev.m_k.part @@ -1,3 +1,5 @@ pc98 = evdev(pc98) applealu_jis = evdev+macintosh(jisevdev) + olpc = evdev+olpc(olpc) + olpcm = evdev+olpc(olpcm) * = evdev diff --git a/symbols/es b/symbols/es index cf66f9b..5adf1a2 100644 --- a/symbols/es +++ b/symbols/es @@ -158,10 +158,12 @@ xkb_symbols "mac" { partial alphanumeric_keys xkb_symbols "olpc" { + // http://wiki.laptop.org/go/OLPC_Spanish_Keyboard + include "us(basic)" name[Group1]="Spanish"; - key { [ masculine, ordfeminine ] }; + key { [ masculine, ordfeminine ] }; key { [ 1, exclam, bar ] }; key { [ 2, quotedbl, at ] }; key { [ 3, dead_grave, numbersign, grave ] }; @@ -180,7 +182,7 @@ xkb_symbols "olpc" { key { [ ntilde, Ntilde ] }; key { [ plus, asterisk, dead_tilde ] }; - key { [ bracketright, braceright, section ] }; + key { [ bracketright, braceright, section ] }; key { [ comma, semicolon ] }; key { [ period, colon ] }; @@ -192,6 +194,47 @@ xkb_symbols "olpc" { }; partial alphanumeric_keys +xkb_symbols "olpcm" { + + // Mechanical (non-membrane) OLPC Spanish keyboard layout. + // See: http://wiki.laptop.org/go/OLPC_Spanish_Non-membrane_Keyboard + + include "us(basic)" + name[Group1]="Spain"; + + key { [ questiondown, exclamdown, backslash ] }; + key { [ 1, exclam, bar ] }; + key { [ 2, quotedbl, at ] }; + key { [ 3, dead_grave, numbersign, grave ] }; + key { [ 4, dollar, asciitilde, dead_tilde ] }; + key { [ 5, percent, asciicircum, dead_circumflex ] }; + key { [ 6, ampersand, notsign ] }; + key { [ 7, slash, backslash ] }; // no '\' label on olpcm, leave for compatibility + key { [ 8, parenleft, masculine ] }; + key { [ 9, parenright, ordfeminine ] }; + key { [ 0, equal ] }; + key { [ apostrophe, question ] }; + + key { [ e, E, EuroSign ] }; + key { [ dead_acute, dead_diaeresis, dead_abovering, acute ] }; + key { [ plus, asterisk ] }; + + key { [ ntilde, Ntilde ] }; + // no AC11 or AC12 on olpcm + + key { [ comma, semicolon ] }; + key { [ period, colon ] }; + key { [ minus, underscore ] }; + + key { [ less, greater ] }; + key { [ bracketleft, braceleft, ccedilla, Ccedilla ] }; + key { [ bracketright, braceright ] }; + + + include "level3(ralt_switch)" +}; + +partial alphanumeric_keys xkb_symbols "deadtilde" { include "es(basic)" diff --git a/symbols/olpc b/symbols/olpc index e9e950b..250e2c5 100644 --- a/symbols/olpc +++ b/symbols/olpc @@ -13,9 +13,9 @@ xkb_symbols "olpc" { modifier_map Mod4 { KP_Prior }; // KP_Prior is the "O" game key modifier_map Mod5 { KP_Next }; // KP_Next is the "X" game key - key { [ XF86Search ] }; // search key - key { [ XF86Meeting ] }; // fn+search key + key { [ XF86Search ] }; // search key (unpopulated on olpcm, harmless) + key { [ XF86Meeting ] }; // fn+search key (unpopulated on olpcm, harmless) key { [ XF86Start ] }; // gear key (fn+space) - key { [ XF86TaskPane ] }; // frame key (the top-right key) - key { [ XF86Messenger ] }; // overlay key (next to frame key) + key { [ XF86TaskPane ] }; // frame key (the top-right key) (unpopulated on olpcm, harmless) + key { [ XF86Messenger ] }; // overlay key (next to frame key) (unpopulated on olpcm, harmless) }; diff --git a/symbols/us b/symbols/us index 11c971c..d0c6f23 100644 --- a/symbols/us +++ b/symbols/us @@ -1033,7 +1033,7 @@ xkb_symbols "olpc" { key { [ j, J, EuroSign, EuroSign ] }; key { [ semicolon, colon, masculine, ordfeminine ] }; key { [ apostrophe, quotedbl, currency, currency ] }; - key { [ backslash, bar, section, section ] }; + key { [ backslash, bar, section, section ] }; key { [ c, C, ccedilla, Ccedilla ] }; key { [ n, N, ntilde, Ntilde ] }; @@ -1054,6 +1054,63 @@ xkb_symbols "olpc2" { include "group(olpc)" }; +xkb_symbols "olpcm" { + + include "us(basic)" + name[Group1]= "USA"; + + // Mechanical (non-membrane) OLPC int'l US English keyboard layout. + // See: http://wiki.laptop.org/go/OLPC_English_Non-membrane_Keyboard + + key { [ grave, asciitilde, dead_grave, dead_tilde ] }; + key { [ 1, exclam, exclamdown, exclamdown ] }; + key { [ 2, at, notsign, notsign ] }; + key { [ 3, numbersign, 0x1000300, 0x1000300 ] }; // combining grave + key { [ 4, dollar, 0x1000301, 0x1000301 ] }; // combining acute + key { [ 5, percent, 0x1000306, 0x1000306 ] }; // combining breve above + key { [ 6,asciicircum, 0x100030A, 0x100030A ] }; // combining ring above + key { [ 7, ampersand, 0x1000302, 0x1000302 ] }; // combining circumflex above + key { [ 8, asterisk, 0x100030C, 0x100030C ] }; // combining caron above + key { [ 9, parenleft, 0x1000307, 0x1000307 ] }; // combining dot above + key { [ 0, parenright, 0x1000308, 0x1000308 ] }; // combining diaeresis above + key { [ minus, underscore, 0x1000304, 0x1000304 ] }; // combining macron above + + key { [ q, Q, Greek_omega, Greek_OMEGA ] }; + key { [ w, W, oslash, Oslash ] }; + key { [ e, E, oe, OE ] }; + key { [ r, R, 0x1000327, 0x1000327 ] }; // combining cedilla + key { [ t, T, 0x100032E, 0x100032E ] }; // combining breve below + key { [ y, Y, 0x1000325, 0x1000325 ] }; // combining ring below + key { [ u, U, 0x100032D, 0x100032D ] }; // combining circumflex below + key { [ i, I, 0x100032C, 0x100032C ] }; // combining caron below + key { [ o, O, 0x1000323, 0x1000323 ] }; // combining dot below + key { [ p, P, 0x1000324, 0x1000324 ] }; // combining diaeresis below + key { [ bracketleft, braceleft, 0x1000331, 0x1000331 ] }; // combining macron below + key { [bracketright, braceright, 0x1000330, 0x1000330 ] }; // combining tilde below + + key { [ a, A, ae, AE ] }; + key { [ s, S, ssharp, 0x1001E9C ] }; // uppercase S sharp + key { [ d, D, eth, ETH ] }; + key { [ f, F, thorn, THORN ] }; + key { [ h, H, sterling, sterling ] }; + key { [ j, J, EuroSign, EuroSign ] }; + key { [ semicolon, colon, masculine, ordfeminine ] }; + // no AC11 or AC12 on olpcm + + key { [ c, C, ccedilla, Ccedilla ] }; + key { [ n, N, ntilde, Ntilde ] }; + key { [ m, M, mu, mu ] }; + key { [ comma, less, guillemotleft, guillemotleft ] }; + key { [ period, greater, guillemotright, guillemotright ] }; + key { [ slash, question, questiondown, questiondown ] }; + + key { [ backslash, bar, section, section ] }; + key { [ equal, plus, 0x1000303, 0x1000303 ] }; + key { [ apostrophe, quotedbl, currency, currency ] }; + + include "level3(ralt_switch)" +}; + // Based on Cherokee Nation Official Layout // http://www.cherokee.org/extras/downloads/font/Keyboard.htm -- 1.8.1