/caps2esc

Remap caps lock to both ctrl (when pressed with another key) and esc (when pressed alone)

Primary LanguageCMIT LicenseMIT

DEPRECATED: Use https://github.com/rvaiya/keyd instead

caps2esc

Remap caps lock to both ctrl (when pressed with another key) and esc (when pressed alone).

Dependencies

Building

$ git clone git@gitlab.com:interception/linux/plugins/caps2esc.git
$ cd caps2esc
$ mkdir build
$ cd build
$ cmake ..
$ make

Execution

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.

Installation

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:

Caveats

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.