My dual function keys mapping

To make my hotkeys react differently to short press and long press I use interception – dual function keys and configure it in /etc/interception/my-mappings.yaml

Short press right Control translates to CTRL+Shift+L to open my password manager.
Short press on right Alt translates Meta+Shift+P, that is set in sway config to “exec copyq toggle”


MAPPINGS:
  - KEY: KEY_RIGHTCTRL
    TAP: [ KEY_LEFTCTRL, KEY_LEFTSHIFT, KEY_L, ]
    HOLD: KEY_RIGHTCTRL
  - KEY: KEY_RIGHTALT
    TAP: [ KEY_LEFTMETA, KEY_LEFTSHIFT, KEY_P, ]
    HOLD: KEY_RIGHTALT
  - KEY: KEY_LEFTCTRL
    TAP: KEY_COMPOSE #menu key
    HOLD: KEY_LEFTCTRL
  - KEY: KEY_CAPSLOCK
    TAP: KEY_ESC
    HOLD: [KEY_LEFTMETA, KEY_S]

Leave a Comment