# The name of the device to remap. # Run `sudo evremap list-devices` to see the devices available # on your system. device_name = "Logitech USB Keyboard" # If you have multiple devices with the same name, you can optionally # specify the `phys` value that is printed by the `list-devices` subcommand # phys = "usb-0000:07:00.3-2.1.1/input0" # Configure CAPSLOCK as a Dual Role key. # Holding it produces LEFTCTRL, but tapping it # will produce ESC. # Both `tap` and `hold` can expand to multiple output keys. [[dual_role]] input = "KEY_CAPSLOCK" hold = ["KEY_LEFTCTRL"] tap = ["KEY_ESC"] # Turn RIGHT ALT into a vim-arrow layer. # We first neuter it: instead of ever emitting KEY_RIGHTALT (which apps treat # as "activate menu" on a bare tap), it becomes KEY_F13 -- a real keycode that # is unbound in every app, so tapping or holding right alt alone does nothing. # The chords below then turn F13 + h/j/k/l into the arrow keys. [[dual_role]] input = "KEY_RIGHTALT" hold = ["KEY_F13"] tap = ["KEY_F13"] [[remap]] input = ["KEY_F13", "KEY_H"] output = ["KEY_LEFT"] [[remap]] input = ["KEY_F13", "KEY_J"] output = ["KEY_DOWN"] [[remap]] input = ["KEY_F13", "KEY_K"] output = ["KEY_UP"] [[remap]] input = ["KEY_F13", "KEY_L"] output = ["KEY_RIGHT"] [[remap]] input = ["KEY_F13", "KEY_U"] output = ["KEY_PAGEUP"] [[remap]] input = ["KEY_F13", "KEY_D"] output = ["KEY_PAGEDOWN"] # Word-wise motion: emit Ctrl+Arrow so it jumps by word. [[remap]] input = ["KEY_F13", "KEY_B"] output = ["KEY_LEFTCTRL", "KEY_LEFT"] [[remap]] input = ["KEY_F13", "KEY_W"] output = ["KEY_LEFTCTRL", "KEY_RIGHT"]