Skip to content

Interception plugin for mapping ijkl keys to arrow keys when capslock is pressed down

License

Notifications You must be signed in to change notification settings

unkhz/udevmon-capslock-navigation

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

udevmon-capslock-navigation

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

What is it?

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

Dependencies

Building

git clone [email protected]:unkhz/udevmon-capslock-navigation
cd udevmon-capslock-navigation
mkdir build
cd build
cmake ..
make
sudo make install

Enabling

udevmon

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]

systemd

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

License

MIT

About

Interception plugin for mapping ijkl keys to arrow keys when capslock is pressed down

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 96.2%
  • CMake 3.8%