Interception plugin for mapping capslock
to navigation keys near the home row:
- j -> left
- k -> down
- i -> up
- l -> right
- h -> home
- ; -> end
- backspace -> delete
- capslock up+down is translated to esc up+down, unless other keys are pressed while capslock is down
Yet another plugin for interception tools to recreate some functionality of a MacOS karabiner setup. The purpose is to recapture the useless caps-lock key for something useful. In this case it's the ESC key and arrow navigation.
Built on top of these two existing plugins
git clone [email protected]:unkhz/udevmon-capslock-navigation
cd udevmon-capslock-navigation
mkdir build
cd build
cmake ..
make
sudo make install
udevmon-capslock-navigation
is an Interception Tools plugin. A suggested
udevmon
job configuration (/etc/udevmon.yaml
) is:
- JOB: "intercept -g $DEVNODE | udevmon-capslock-navigation | uinput -d $DEVNODE"
DEVICE:
EVENTS:
EV_KEY: [KEY_CAPSLOCK, KEY_ESC, KEY_BACKSPACE, KEY_DELETE,
KEY_H, KEY_I, KEY_J, KEY_K, KEY_L, KEY_SEMICOLON,
KEY_HOME, KEY_LEFT, KEY_DOWN, KEY_UP, KEY_RIGHT,
KEY_END]
A suggested systemd service to run udevmon can be setup by creating the
following file (/etc/systemd/udevmon.service
):
[Unit]
Description=udevmon
After=systemd-user-sessions.service
[Service]
ExecStart=/usr/bin/nice -n -20 usr/local/bin/udevmon -c /etc/udevmon.yaml
[Install]
WantedBy=multi-user.target
Then, you can enable and start the service like any other:
sudo systemctl enable --now udevmon.service