DEPRECATED: Use https://github.com/rvaiya/keyd instead
Remap caps lock to both ctrl (when pressed with another key) and esc (when pressed alone).
$ git clone git@gitlab.com:interception/linux/plugins/caps2esc.git
$ cd caps2esc
$ mkdir build
$ cd build
$ cmake ..
$ make
caps2esc
is an Interception Tools plugin. A suggested
udevmon
job configuration is:
- JOB: "intercept -g $DEVNODE | caps2esc | uinput -d $DEVNODE"
DEVICE:
EVENTS:
EV_KEY: [KEY_CAPSLOCK, KEY_ESC]
For more information about the Interception Tools, check the project's website.
I'm maintaining an Archlinux package on AUR:
I don't use Ubuntu and recommend Archlinux instead, as it provides the AUR, so I don't maintain PPAs. For more information on Ubuntu/Debian installation check this:
As always, there's always a caveat:
intercept -g
will "grab" the detected devices for exclusive access.- If you tweak your key repeat settings, check whether they get reset. Please check this report about the resolution.