by Zubair Abid
As I’ve said before, my Caps Lock key serves as both my Left Control key (if I hold it), and my Escape key (if I tap it).
This configuration has a bug: occasionally entering Esc
when I want an empty
Left Ctrl
. Essentially, when I hold down on the key and then let go without
tapping any other key, the expected behaviour is
that it should behave like tapping a Left Ctrl
. The actual behaviour is that
of tapping Esc
, which is not the greatest key to accidentally tap.
I’ve talked about the plugin in the post about trying to setup home row mods.
Install interception-tools and dual function keys. The installation process
is available at the links; for Arch systems you can run
sudo pacman -Syu interception-tools interception-dual-function-keys
.
Then, configuration. Setup the following job in
/etc/interception/udevmon.yaml
:
- JOB: "intercept -g $DEVNODE | dual-function-keys -c path_to_config.yaml | uinput -d $DEVNODE"
DEVICE:
EVENTS:
EV_KEY: [KEY_CAPSLOCK, KEY_ESC]
The config can be setup wherever is appropriate.
TIMING:
- TAP_MILLISEC: 200
- DOUBLE_TAP_MILLISEC: 0
MAPPINGS:
- KEY: KEY_CAPSLOCK
TAP: KEY_ESC
HOLD: KEY_LEFTCTRL
- KEY: KEY_ESC
TAP: KEY_ESC
HOLD: KEY_CAPSLOCK
Generally, caveats as mentioned in the home row mods post apply. The key details are to ensure that
/etc/interception/udevmon.yaml
TIMING:
...
MAPPINGS:
# Enter your other mappings
- KEY: KEY_CAPSLOCK
...