// Modern documentation of the xkb format: https://xkbcommon.org/doc/current/keymap-text-format-v1.html // Older: // http://www.x.org/archive/X11R6.8.2/doc/XKB-Enhancing4.html // https://www.charvolant.org/doug/xkb/html/index.htm // https://wiki.archlinux.org/index.php/X_KeyBoard_extension // http://grahamwideman.wikispaces.com/linux+--+keyboard+configuration,+xkb // on actions: https://www.x.org/releases/X11R7.6/doc/kbproto/xkbproto.html#key_actions // full layout with de as base default hidden partial alphanumeric_keys xkb_symbols "de" { include "de" include "neolight(layers)" name[Group1] = "German (Neolight)"; }; // full layout with de as base with escape keys variant hidden partial alphanumeric_keys xkb_symbols "de_escape_keys" { include "de" include "neolight(layers)" include "neolight(escape_keys)" name[Group1] = "German (Neolight, additional escape keys)"; }; // the additional layers hidden partial alphanumeric_keys xkb_symbols "layers" { // preserves AltGr and Shift+AltGr levels include "neolight(modifiers)" // See neolight_types file key.type[Group1] = "EIGHT_LEVEL_NEOLIGHT"; // Reason for the RedirectKey action in some entries: // Some (old) applications don't properly handle arrow keys and similar // when they are sent while also pressing a modifier. RedirectKey with // clearmods solves that issue, but is not supported in wayland/libxkbcommon. // libxkbcommon will ignore the RedirectKey action and use the symbol instead, // while X11 will use RedirectKey. // https://github.com/xkbcommon/libxkbcommon/issues/18 // https://github.com/mihi314/neolight/issues/3 // Number row // -------------------------------------------------------------- key { // 1 symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, onesuperior, onesuperior, NoSymbol, NoSymbol], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction()] }; key { // 2 symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, twosuperior, twosuperior, NoSymbol, NoSymbol], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction()] }; key { // 3 symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, threesuperior, threesuperior, NoSymbol, NoSymbol], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction()] }; key { // 4 symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, U203A, U203A, NoSymbol, NoSymbol], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction()] }; key { // 5 symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, U2039, U2039, NoSymbol, NoSymbol], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction()] }; key { // 6 symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, cent, cent, NoSymbol, NoSymbol], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction()] }; key { // 7 symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, yen, yen, NoSymbol, NoSymbol], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction()] }; key { // 8 symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, singlelowquotemark, singlelowquotemark, NoSymbol, NoSymbol], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction()] }; key { // 9 symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, leftsinglequotemark, leftsinglequotemark, NoSymbol, NoSymbol], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction()] }; key { // 0 symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, rightsinglequotemark, rightsinglequotemark, NoSymbol, NoSymbol], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction()] }; key { // ß symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction()] }; key { // ´ symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, dead_abovering, dead_abovering, NoSymbol, NoSymbol], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction()] }; // Top row // -------------------------------------------------------------- key { // q symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, ellipsis, ellipsis, Prior, Prior], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), RedirectKey(keycode=, clearmods=LevelFive), RedirectKey(keycode=, clearmods=LevelFive)] }; key { // w symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, underscore, underscore, BackSpace, BackSpace], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), RedirectKey(keycode=, clearmods=LevelFive), RedirectKey(keycode=, clearmods=LevelFive)] }; key { // e symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, bracketleft, bracketleft, Up, Up], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), RedirectKey(keycode=, clearmods=LevelFive), RedirectKey(keycode=, clearmods=LevelFive)] }; key { // r symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, bracketright, bracketright, Delete, Delete], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), RedirectKey(keycode=, clearmods=LevelFive), RedirectKey(keycode=, clearmods=LevelFive)] }; key { // t symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, asciicircum, asciicircum, Next, Next], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), RedirectKey(keycode=, clearmods=LevelFive), RedirectKey(keycode=, clearmods=LevelFive)] }; key { // z symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, exclam, exclam, NoSymbol, NoSymbol], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction()] }; key { // u symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, less, less, NoSymbol, NoSymbol], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction()] }; key { // i symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, greater, greater, NoSymbol, NoSymbol], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction()] }; key { // o symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, equal, equal, NoSymbol, NoSymbol], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction()] }; key { // p symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, ampersand, ampersand, NoSymbol, NoSymbol], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction()] }; key { // ü symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, U017F, U017F, NoSymbol, NoSymbol], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction()] }; key { // + symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction()] }; // Middle row // -------------------------------------------------------------- key { // a symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, backslash, backslash, Home, Home], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), RedirectKey(keycode=, clearmods=LevelFive), RedirectKey(keycode=, clearmods=LevelFive)] }; key { // s symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, slash, slash, Left, Left], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), RedirectKey(keycode=, clearmods=LevelFive), RedirectKey(keycode=, clearmods=LevelFive)] }; key { // d symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, braceleft, braceleft, Down, Down], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), RedirectKey(keycode=, clearmods=LevelFive), RedirectKey(keycode=, clearmods=LevelFive)] }; key { // f symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, braceright, braceright, Right, Right], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), RedirectKey(keycode=, clearmods=LevelFive), RedirectKey(keycode=, clearmods=LevelFive)] }; key { // g symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, asterisk, asterisk, End, End], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), RedirectKey(keycode=, clearmods=LevelFive), RedirectKey(keycode=, clearmods=LevelFive)] }; key { // h symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, question, question, Left, Left], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), RedirectKey(keycode=, clearmods=LevelFive), RedirectKey(keycode=, clearmods=LevelFive)] }; key { // j symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, parenleft, parenleft, Down, Down], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), RedirectKey(keycode=, clearmods=LevelFive), RedirectKey(keycode=, clearmods=LevelFive)] }; key { // k symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, parenright, parenright, Up, Up], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), RedirectKey(keycode=, clearmods=LevelFive), RedirectKey(keycode=, clearmods=LevelFive)] }; key { // l symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, minus, minus, Right, Right], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), RedirectKey(keycode=, clearmods=LevelFive), RedirectKey(keycode=, clearmods=LevelFive)] }; key { // ö symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, colon, colon, NoSymbol, NoSymbol], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction()] }; key { // ä symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, at, at, NoSymbol, NoSymbol], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction()] }; // Bottom row // -------------------------------------------------------------- key { // y symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, numbersign, numbersign, Escape, Escape], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), RedirectKey(keycode=, clearmods=LevelFive), RedirectKey(keycode=, clearmods=LevelFive)] }; key { // x symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, dollar, dollar, Tab, ISO_Left_Tab], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), RedirectKey(keycode=, clearmods=LevelFive), RedirectKey(keycode=, clearmods=LevelFive)] }; key { // c symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, bar, bar, NoSymbol, NoSymbol], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction()] }; key { // v symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, asciitilde, asciitilde, Return, Return], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), RedirectKey(keycode=, clearmods=LevelFive), RedirectKey(keycode=, clearmods=LevelFive)] }; key { // b symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, grave, grave, NoSymbol, NoSymbol], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction()] }; key { // n symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, plus, plus, NoSymbol, NoSymbol], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction()] }; key { // m symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, percent, percent, NoSymbol, NoSymbol], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction()] }; key { // , symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, quotedbl, quotedbl, NoSymbol, NoSymbol], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction()] }; key { // . symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, apostrophe, apostrophe, NoSymbol, NoSymbol], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction()] }; key { // - symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, semicolon, semicolon, NoSymbol, NoSymbol], actions[Group1] = [NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction(), NoAction()] }; }; hidden partial modifier_keys xkb_symbols "modifiers" { // Using the LevelFive modifier for layer 4 and LevelThree+LevelFive for // layer 3 (instead of the other way round) because this makes arrow keys // etc work with sublime text. (Sublime text seems not like it when // LevelThree is included as modifier, maybe because of it also being // used for AltGr) // Modifier keys for layer 3 // alt+caps still activates capslock key { type[Group1] = "PC_ALT_LEVEL2", symbols[Group1] = [VoidSymbol, Caps_Lock], actions[Group1] = [SetMods(modifiers=LevelThree+LevelFive), LockMods(modifiers=Lock)] }; key { // # key type[Group1] = "ONE_LEVEL", symbols[Group1] = [VoidSymbol], actions[Group1] = [SetMods(modifiers=LevelThree+LevelFive)] }; // Modifier keys for layer 4 key { // < key type[Group1] = "PC_ALT_LEVEL2", symbols[Group1] = [VoidSymbol, VoidSymbol], actions[Group1] = [SetMods(modifiers=LevelFive), LockMods(modifiers=LevelFive)] }; key { type[Group1] = "PC_ALT_LEVEL2", symbols[Group1] = [VoidSymbol, VoidSymbol], actions[Group1] = [SetMods(modifiers=LevelFive), LockMods(modifiers=LevelFive)] }; }; // additional escape keys for vim users hidden partial alphanumeric_keys xkb_symbols "escape_keys" { key { // q symbols[Group1] = [NoSymbol, NoSymbol, NoSymbol, NoSymbol, Escape, NoSymbol] }; key { // + symbols[Group1] = [Escape, NoSymbol, NoSymbol, NoSymbol, Escape, NoSymbol] }; }; // can be used together with e.g. Mozc to toggle the japanese IME hidden partial alphanumeric_keys xkb_symbols "jp" { key { // ^ symbols[Group1] = [Zenkaku_Hankaku] }; };