Skip to content

Instantly share code, notes, and snippets.

@cousteaulecommandant
Created December 26, 2017 17:50
Show Gist options
  • Save cousteaulecommandant/e2bd0b70fd94628d40c6a31b4f21b428 to your computer and use it in GitHub Desktop.
Save cousteaulecommandant/e2bd0b70fd94628d40c6a31b4f21b428 to your computer and use it in GitHub Desktop.
// Colemak symbols for xkb on X.Org Server 7.x
// 2006-01-01 Shai Coleman, http://colemak.com/ . Public domain.
// 2017-12-09 Modified to support Level5 switch
partial default alphanumeric_keys modifier_keys
xkb_symbols "basic" {
name[Group1]= "Colemak";
// Alphanumeric section
key.type[Group1] = "EIGHT_LEVEL"; // allows using Level5 switch
key <TLDE> { [ grave, asciitilde, dead_tilde, NoSymbol, U2248 ] };
key <AE01> { [ 1, exclam, exclamdown, onesuperior ] };
key <AE02> { [ 2, at, masculine, twosuperior ] };
key <AE03> { [ 3, numbersign, ordfeminine, threesuperior ] };
key <AE04> { [ 4, dollar, cent, sterling ] };
key <AE05> { [ 5, percent, EuroSign, yen, NoSymbol, U2030 ] };
key <AE06> { [ 6, asciicircum, hstroke, Hstroke ] };
key <AE07> { [ 7, ampersand, eth, ETH ] };
key <AE08> { [ 8, asterisk, thorn, THORN ] };
key <AE09> { [ 9, parenleft, leftsinglequotemark, leftdoublequotemark ] };
key <AE10> { [ 0, parenright, rightsinglequotemark, rightdoublequotemark ] };
key <AE11> { [ minus, underscore, endash, emdash ] };
key <AE12> { [ equal, plus, multiply, division, U2260, plusminus ] };
key <AD01> { [ q, Q, adiaeresis, Adiaeresis ] };
key <AD02> { [ w, W, aring, Aring ] };
key <AD03> { [ f, F, atilde, Atilde ] };
key <AD04> { [ p, P, oslash, Ooblique, paragraph ] };
key <AD05> { [ g, G, dead_ogonek ] };
key <AD06> { [ j, J, dstroke, Dstroke ] };
key <AD07> { [ l, L, lstroke, Lstroke ] };
key <AD08> { [ u, U, uacute, Uacute ] };
key <AD09> { [ y, Y, udiaeresis, Udiaeresis ] };
key <AD10> { [ semicolon, colon, odiaeresis, Odiaeresis ] };
key <AD11> { [ bracketleft, braceleft, guillemotleft, U2039 ] };
key <AD12> { [ bracketright, braceright, guillemotright, U203A ] };
key <BKSL> { [ backslash, bar, ISO_Level5_Latch, brokenbar, NoSymbol, brokenbar ] };
// Level5 = press AltGr, press \, release \, release AltGr (in that order), press other key
key <AC01> { [ a, A, aacute, Aacute ] };
key <AC02> { [ r, R, dead_grave, NoSymbol, registered ] };
key <AC03> { [ s, S, ssharp, NoSymbol, section ] };
key <AC04> { [ t, T, dead_acute, dead_doubleacute, trademark ] };
key <AC05> { [ d, D, dead_diaeresis, NoSymbol, degree ] };
key <AC06> { [ h, H, dead_caron ] };
key <AC07> { [ n, N, ntilde, Ntilde, numerosign ] };
key <AC08> { [ e, E, eacute, Eacute ] };
key <AC09> { [ i, I, iacute, Iacute ] };
key <AC10> { [ o, O, oacute, Oacute ] };
key <AC11> { [ apostrophe, quotedbl, otilde, Otilde ] };
key <AB01> { [ z, Z, ae, AE ] };
key <AB02> { [ x, X, dead_circumflex ] };
key <AB03> { [ c, C, ccedilla, Ccedilla, copyright ] };
key <AB04> { [ v, V, oe, OE ] };
key <AB05> { [ b, B, dead_breve ] };
key <AB06> { [ k, K, dead_abovering ] };
key <AB07> { [ m, M, dead_macron, NoSymbol, mu ] };
key <AB08> { [ comma, less, dead_cedilla, NoSymbol, NoSymbol, U2264 ] };
key <AB09> { [ period, greater, dead_abovedot, NoSymbol, ellipsis, U2265 ] };
key <AB10> { [ slash, question, questiondown ] };
include "nbsp(level4n)" // SPCE = space, space, space, NBSP, space narrow-NBSP
key <CAPS> { type[Group1]="ONE_LEVEL", [ BackSpace ] }; // CAPS = additional backspace
key <LSGT> { type[Group1]="ONE_LEVEL", [ ISO_Level3_Shift ] }; // LSGT = additional Level3
include "level3(ralt_switch)" // RALT = Level3; Level3 = Mod5
modifier_map Mod3 { ISO_Level5_Latch }; // Level5 = Mod3
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment