Skip to content

Instantly share code, notes, and snippets.

@jchnkl
Last active December 14, 2015 03:29
Show Gist options
  • Select an option

  • Save jchnkl/5021078 to your computer and use it in GitHub Desktop.

Select an option

Save jchnkl/5021078 to your computer and use it in GitHub Desktop.
Caps Lock as Escape *and* Control key.
$ tree ~/.xkb
.xkb
├── keymap
│   └── default
└── symbols
└── capslock
$ xkbcomp -I${HOME}/.xkb ${HOME}/.xkb/keymap/default $DISPLAY
default xkb_keymap "default" {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols {
include "pc+us(altgr-intl)+inet(evdev)+capslock(capsescape)"
};
};
// Replace Caps Lock with Escape + Control
partial hidden modifier_keys
xkb_symbols "capsescape" {
replace key <CAPS> {
type[Group1] = "ONE_LEVEL",
symbols[Group1] = [ Escape ],
actions[Group1] = [ SetMods(modifiers=Control) ]
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment