Skip to content
@InputActions

InputActions

InputActions

InputActions is a Linux utility for binding various input device actions (keyboard shortcuts, mouse/touchpad gestures etc.) to system actions.

Important

The project is created primarily for KDE Plasma and will work best in that environment. In other environments certain features may not be available, more information about that can be found in the aforementioned installation guide.

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

    # text expansion (compositor plugins only)
    - type: shortcut
      shortcut: [ leftctrl, space ]

      actions:
        - on: begin
          replace_text:
            # :calc{2+2} -> 4
            - regex: :calc{(.*)}
              replace:
                command: printf "$(qalc -t "$match_1")"

             # :email -> example@example.com
            - regex: :email
              replace: example@example.com

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: []

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

      actions: []

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 -> navigate 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 ]

Repositories

Name Description
ctl The inputactions control tool
discussions Global issue tracker and discussions
installer Installation script
wiki Source for wiki.inputactions.org

Implementations

Name Description
hyprland Hyprland plugin implementation
kwin KWin (Plasma's compositor) plugin implementation
standalone Standalone implementation

Scripting

Name Description
script-template InputActions script template
scripting-types TypeScript type declarations for the scripting API

Libraries

Name Description
core Contains all of InputActions' environment-independent code
libevdev-cpp C++ wrapper for libevdev
libinput-cpp C++ wrapper for libinput

Popular repositories Loading

  1. discussions discussions Public

    Global issue tracker for InputActions (formerly the main repository)

    Shell 470 18

  2. kwin kwin Public

    KWin plugin implementation (for KDE Plasma)

    C++ 12 1

  3. wiki wiki Public

    Wiki for InputActions (https://github.com/taj-ny/InputActions)

    Makefile 1 1

  4. touchpad-visualizer touchpad-visualizer Public

    Simple Linux touchpad visualizer (internal tool)

    C++ 1

  5. ts2mtd ts2mtd Public

    Use any touchscreen device with a web browser as an evdev touchpad/touchscreen (internal tool)

    C++ 1

  6. core core Public

    Core library containing shared logic

    C++ 1

Repositories

Showing 10 of 15 repositories
  • core Public

    Core library containing shared logic

    InputActions/core's past year of commit activity
    C++ 1 GPL-3.0 0 0 0 Updated Sep 16, 2026
  • standalone Public

    Standalone implementation (for other environments)

    InputActions/standalone's past year of commit activity
    C++ 1 GPL-3.0 0 0 0 Updated Sep 15, 2026
  • kwin Public

    KWin plugin implementation (for KDE Plasma)

    InputActions/kwin's past year of commit activity
    C++ 12 GPL-3.0 1 0 0 Updated Sep 15, 2026
  • hyprland Public

    Hyprland plugin implementation

    InputActions/hyprland's past year of commit activity
    C++ 1 GPL-3.0 0 0 0 Updated Sep 15, 2026
  • .github Public
    InputActions/.github's past year of commit activity
    0 0 0 0 Updated Sep 15, 2026
  • wiki Public

    Wiki for InputActions (https://github.com/taj-ny/InputActions)

    InputActions/wiki's past year of commit activity
    Makefile 1 1 1 0 Updated Sep 15, 2026
  • script-template Public template

    InputActions script template

    InputActions/script-template's past year of commit activity
    TypeScript 0 GPL-3.0 0 0 0 Updated Sep 15, 2026
  • scripting-types Public

    TypeScript type declarations for the scripting API

    InputActions/scripting-types's past year of commit activity
    0 GPL-3.0 0 0 0 Updated Sep 15, 2026
  • ctl Public

    Control tool

    InputActions/ctl's past year of commit activity
    C++ 0 GPL-3.0 0 0 0 Updated Sep 13, 2026
  • installer Public
    InputActions/installer's past year of commit activity
    Shell 1 Unlicense 0 0 0 Updated Sep 13, 2026

Most used topics

Loading…