Skip to content

Instantly share code, notes, and snippets.

@jaseg
Last active January 3, 2016 00:48
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 jaseg/8384755 to your computer and use it in GitHub Desktop.
Save jaseg/8384755 to your computer and use it in GitHub Desktop.
My xkb setup
#!/bin/bash
# Remaps [TAB] to mean [ESCAPE] (nice for vim) and properly assigns the "Windows
# key" to MOD4 (nice for the awesome window manager)
# Also, sprinkles some unicode over unused or poorly used keys.
# <LGST> is that key next to left shift that is not found on US keyboards
xkbcomp - $DISPLAY<<EOF
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwertz)"};
xkb_types { include "complete"};
xkb_compat { include "complete"};
xkb_symbols {
include "pc+us(altgr-intl)+inet(evdev)+group(alt_shift_toggle)+level3(ralt_switch)+capslock(escape)"
key <LSGT> { [ doublelowquotemark, leftdoublequotemark, U2665, U2606 ] };
key <AB01> { [ z, Z, U2190, U21E6 ] };
key <AB02> { [ x, X, U2192, U21E8 ] };
key <AB05> { [ b, B, U2714, U2718 ] };
key <AB07> { [ m, M, mu, U26A1 ] };
key <AE01> { [ 1, exclam, U2610, exclamdown ] };
key <AE02> { [ 2, at, U2611, dead_doubleacute ] };
key <AE03> { [ 3, numbersign, U2612, dead_macron ] };
};
xkb_geometry { include "pc(pc104)"};
};
EOF
xmodmap -e "add mod4 = Multi_key"
@jaseg
Copy link
Author

jaseg commented Jan 12, 2014

You would not believe how simple it is to crash X from XKB scripts.

@hideout
Copy link

hideout commented Jan 12, 2014

indeed ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment