Skip to content

Instantly share code, notes, and snippets.

@ironhouzi
Created May 20, 2014 22:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ironhouzi/57d45bb8dbbc709138d5 to your computer and use it in GitHub Desktop.
Save ironhouzi/57d45bb8dbbc709138d5 to your computer and use it in GitHub Desktop.
XKB rules for Poker II in both English (US) and Norwegian (no dead keys), allowing esc to be used as the key to the left of '1' on a full size keyboard. Esc is handled by xcape to allow for dual-role caps_lock.
<!-- This goes in: X11/xkb/rules/evdev.xml -->
<!-- This file adds the custom layouts (no_poker & us_poker) -->
<!-- to the menu of available keyboard layouts. -->
<!-- This snippet goes above the tag: </layoutList> -->
<!-- ... -->
<layout>
<configItem>
<name>us_poker</name>
<shortDescription>us</shortDescription>
<description>English (US) for Poker II</description>
<languageList>
<iso639Id>eng</iso639Id>
</languageList>
</configItem>
</layout>
<layout>
<configItem>
<name>no_poker</name>
<shortDescription>no</shortDescription>
<description>Norwegian for Poker II</description>
<languageList>
<iso639Id>nor</iso639Id>
</languageList>
</configItem>
</layout>
<!-- </layoutList> -->
<!-- ... -->
// This file goes in: X11/xkb/symbols
//
// It switches the esc key with the key located to the left of '1' on a
// normal sized keyboard. This is handy if you're using dual role
//caps_lock on a 60% keyboard like the Poker II.
//
// based on a keyboard map from an 'xkb/symbols/no' file
default
xkb_symbols "basic" {
include "latin(type2)"
name[Group1]="Norwegian for Poker II";
// Alphanumeric section
key <AE01> { [ 1, exclam, exclamdown, onesuperior ] };
key <AE02> { [ 2, quotedbl, at, twosuperior ] };
key <AE03> { [ 3, numbersign, sterling, threesuperior] };
key <AE04> { [ 4, currency, dollar, onequarter ] };
key <AE05> { [ 5, percent, onehalf, 0x1002030 ] };
key <AE06> { [ 6, ampersand, yen, fiveeighths ] };
key <AE07> { [ 7, slash, braceleft, division ] };
key <AE08> { [ 8, parenleft, bracketleft, guillemotleft] };
key <AE09> { [ 9, parenright, bracketright, guillemotright] };
key <AE10> { [ 0, equal, braceright, degree ] };
key <AE11> { [ plus, question, plusminus, questiondown ] };
key <AE12> { [ backslash, dead_grave, dead_acute, notsign ] };
key <AD01> { [ q, Q ] };
key <AD02> { [ w, W ] };
key <AD03> { [ e, E, EuroSign, cent ] };
key <AD05> { [ t, T, thorn, THORN ] };
key <AD04> { [ r, R, registered, trademark ] };
key <AD06> { [ y, Y ] };
key <AD07> { [ u, U ] };
key <AD08> { [ i, I ] };
key <AD09> { [ o, O, oe, OE ] };
key <AD10> { [ p, P, Greek_pi, Greek_PI ] };
key <AD11> { [ aring, Aring, dead_diaeresis, dead_abovering ] };
key <AD12> { [ diaeresis, circumflex, tilde, caron ] };
key <AC01> { [ a, A, ordfeminine, masculine ] };
key <AC02> { [ s, S ] };
key <AC03> { [ d, D ] };
key <AC04> { [ f, F ] };
key <AC05> { [ g, G ] };
key <AC06> { [ h, H ] };
key <AC07> { [ j, J ] };
key <AC08> { [ k, K ] };
key <AC09> { [ l, L ] };
key <AC10> { [ oslash, Ooblique, dead_acute, dead_doubleacute ] };
key <AC11> { [ ae, AE, dead_circumflex, dead_caron] };
key <AB10> { [ minus, underscore, dead_belowdot, dead_abovedot ] };
key <AB01> { [ z, Z ] };
key <AB02> { [ x, X ] };
key <AB03> { [ c, C, copyright, copyright ] };
key <AB04> { [ v, V ] };
key <AB05> { [ b, B ] };
key <AB06> { [ n, N ] };
key <AB07> { [ m, M ] };
key <AB08> { [ comma, semicolon, dead_cedilla, dead_ogonek ] };
key <AB09> { [ period, colon, periodcentered, dead_abovedot ] };
key <AB10> { [ minus, underscore, endash, emdash ] };
key <ESC> { [ bar, section, brokenbar, paragraph ] };
//key <BKSL> { [apostrophe, asterisk, dead_doubleacute, multiply ] };
key <LSGT> { [ less, greater, onehalf, threequarters] };
// End alphanumeric section
include "nbsp(level3n)"
include "keypad(ossmath)"
include "kpdl(comma)"
key <KPMU> { [ Escape ] };
include "level3(ralt_switch)"
};
// This file goes in: X11/xkb/symbols
//
// It switches the esc key with the key located to the left of '1' on a
// normal sized keyboard. This is handy if you're using dual role
// caps_lock on a 60% keyboard like the Poker II.
//
default
xkb_symbols "basic" {
name[Group1]= "English (US) for Poker II";
// Alphanumeric section
key <ESC> { [ grave, asciitilde ] };
key <AE01> { [ 1, exclam ] };
key <AE02> { [ 2, at ] };
key <AE03> { [ 3, numbersign ] };
key <AE04> { [ 4, dollar ] };
key <AE05> { [ 5, percent ] };
key <AE06> { [ 6, asciicircum ] };
key <AE07> { [ 7, ampersand ] };
key <AE08> { [ 8, asterisk ] };
key <AE09> { [ 9, parenleft ] };
key <AE10> { [ 0, parenright ] };
key <AE11> { [ minus, underscore ] };
key <AE12> { [ equal, plus ] };
key <AD01> { [ q, Q ] };
key <AD02> { [ w, W ] };
key <AD03> { [ e, E ] };
key <AD04> { [ r, R ] };
key <AD05> { [ t, T ] };
key <AD06> { [ y, Y ] };
key <AD07> { [ u, U ] };
key <AD08> { [ i, I ] };
key <AD09> { [ o, O ] };
key <AD10> { [ p, P ] };
key <AD11> { [ bracketleft, braceleft ] };
key <AD12> { [ bracketright, braceright ] };
key <AC01> { [ a, A ] };
key <AC02> { [ s, S ] };
key <AC03> { [ d, D ] };
key <AC04> { [ f, F ] };
key <AC05> { [ g, G ] };
key <AC06> { [ h, H ] };
key <AC07> { [ j, J ] };
key <AC08> { [ k, K ] };
key <AC09> { [ l, L ] };
key <AC10> { [ semicolon, colon ] };
key <AC11> { [ apostrophe, quotedbl ] };
key <AB01> { [ z, Z ] };
key <AB02> { [ x, X ] };
key <AB03> { [ c, C ] };
key <AB04> { [ v, V ] };
key <AB05> { [ b, B ] };
key <AB06> { [ n, N ] };
key <AB07> { [ m, M ] };
key <AB08> { [ comma, less ] };
key <AB09> { [ period, greater ] };
key <AB10> { [ slash, question ] };
key <BKSL> { [ backslash, bar ] };
key <KPMU> { [ Escape ] };
// End alphanumeric section
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment