reference_actions.md

April 25, 2026 ยท View on GitHub

Actions

Remapping lets you assign actions to keys. Actions can only be used in keymap and press/release keys.

Example: Run programs

Run a program when KEY_A is pressed (and repeated). The trigger key is disabled entirely. The program is just started and ignored, it does not block key processing.

keymap:
  - remap:
      Capslock: { launch: ["notify-send", "Hello World!"] }

Note: Holding down capslock will generate repeat events, which will run the program every say 50ms.

Example: Run bash script

By using yaml notation for multi-line text it's possible to write scripts:

keymap:
  - remap:
      Capslock:
        launch:
          - "bash"
          - "-c"
          - |
            NAME=`whoami`
            WORKDIR=`pwd`
            notify-send "Username: $NAME" "Workdir: $WORKDIR"

Example: Key events

It's possible to emit the individual press, repeat and release events:

throttle_ms: 10 # Slows down events.
keymap:
  - remap:
      Capslock: [{ press: B }, { repeat: B }, { release: B }]

Note: throttle_ms is necessary for some applications because actions are sent without any delay in-between by default.

Note: That repeat events are usually ignored by the kernel. It emits the repeat events itself.

Example: Sleep

Block key processing in the given amount of ms.

keymap:
  - remap:
      Capslock: { sleep: 10 }

Example: Close applications

Close all applications that have the exact app_class.

keymap:
  - remap:
      Capslock: { close_apps: "firefox" }

Since: v0.15.3. Not supported in GNOME yet.