Linux utility for binding keyboard, mouse, touchpad and touchscreen actions to system actions (read-only mirror of https://github.com/taj-ny/InputActions)
  • Nix 59.9%
  • CMake 40.1%
Find a file
2026-03-05 18:17:22 +00:00
.github finalize the repository split 2026-03-05 17:23:54 +01:00
ctl@b58267d54f finalize the repository split 2026-03-05 17:23:54 +01:00
hyprland@a6a7400278 finalize the repository split 2026-03-05 17:23:54 +01:00
kwin@b010279346 finalize the repository split 2026-03-05 17:23:54 +01:00
standalone@17e9c6e085 finalize the repository split 2026-03-05 17:23:54 +01:00
.gitignore tests: add example test 2024-10-16 10:02:07 +02:00
.gitmodules finalize the repository split 2026-03-05 17:23:54 +01:00
CMakeLists.txt finalize the repository split 2026-03-05 17:23:54 +01:00
flake.lock finalize the repository split 2026-03-05 17:23:54 +01:00
flake.nix finalize the repository split 2026-03-05 17:23:54 +01:00
hyprpm.toml hyprland: fix incompatibility with home-manager 2025-08-06 21:28:40 +02:00
LICENSE initial commit 2024-10-09 20:12:19 +02:00
README.md readme: include the phrases "mouse gestures" and "touchpad gestures" 2026-02-11 16:01:34 +00:00

InputActions

Linux utility for binding keyboard shortcuts, mouse gestures, touchpad gestures and touchscreen gestures to system actions, created with flexibility in mind.

Supported environments: Plasma 6, Hyprland, GNOME, other Wayland compositors (availability of extra features depends on implemented protocols), X11 (base features only)

Installation & getting started | Wiki repository

Features

  • Supported device types: keyboard, mouse, touchpad, touchscreen
  • Input event filtering
  • Uses libinput, which handles device quirks
  • Complementary evdev input backend for better touchpad support (may be disabled in case of issues)
  • Conditional triggers
  • Built-in action for simulating keyboard and mouse input
Example configuration
device_rules:
  # ignore a device
  - conditions: $name contains YubiKey
    ignore: true

keyboard:
  gestures:
    # shift + meta + q -> kill window under pointer
    - type: shortcut
      shortcut: [ leftshift, leftmeta, q ]

      actions:
        - on: begin
          command: kill -9 $window_under_pointer_pid

mouse:
  gestures:
    # right + draw circle clockwise -> open dolphin
    - type: stroke
      strokes: [ 'Gw4A/DELBwxLFRAZWiUXJWM6HzBkSyRKWlQpYShYOasISUXHACVR6Q8WWP0zEmQA' ]
      mouse_buttons: [ right ]

      actions:
        - command: dolphin

    # trigger group - condition is applied to all subtriggers specified in 'gestures'
    - conditions: $window_class == firefox
      gestures:
        # meta + vertical wheel -> volume control
        - type: wheel
          direction: up_down

          conditions: $keyboard_modifiers == meta

          actions:
            - on: update
              interval: '+'
              input:
                - keyboard: [ volumedown ]

            - on: update
              interval: '-'
              input:
                - keyboard: [ volumeup ]

    # this trigger will override the one below due to higher priority, but only if firefox is focused
    - type: press
      mouse_buttons: [ middle ]
      instant: true

      conditions: $window_class == firefox

      actions:
        - on: end
          # ...

    - type: press
      mouse_buttons: [ middle ]
      instant: true

      actions:
        - on: end
          # ...

touchpad:
  gestures:
    # place 2 fingers, at least 1 on the top/bottom edge, then move in circular motion -> circular scrolling
    - type: circle
      fingers: 2
      direction: any

      conditions:
        any:
          - $finger_1_initial_position_percentage_y <= 0.05
          - $finger_2_initial_position_percentage_y <= 0.05
          - $finger_1_initial_position_percentage_y >= 0.95
          - $finger_2_initial_position_percentage_y >= 0.95

      actions:
        - on: update
          interval: -0.5
          input:
            - mouse: [ wheel 0 -1 ]

        - on: update
          interval: 0.5
          input:
            - mouse: [ wheel 0 1 ]

    # place 2 fingers on the left half, then click -> naviate back
    - type: click
      fingers: 2

      conditions:
        - $finger_1_position_percentage_x <= 0.5
        - $finger_2_position_percentage_x <= 0.5

      actions:
        - on: begin
          input:
            - mouse: [ back ]

    # move 3 fingers -> drag window
    - type: swipe
      fingers: 3
      direction: any
      resume_timeout: 500 # optional: allow lifting fingers for 500 ms

      actions:
        - on: begin
          input:
            - keyboard: [ +leftmeta ]
            - mouse: [ +left ]

        - on: update
          input:
            - mouse: [ move_by_delta ]

        - on: end_cancel
          input:
            - keyboard: [ -leftmeta ]
            - mouse: [ -left ]

Acknowledgements