~mil/limkd

Libinput Multipress Key Daemon: Use libinput to bind multipress key events to execute different actions.
Revert "Add support for -nb nopbinary to effectively nop if binaryname in /proc"
Revert "Fix bug with nopbinary dispatch check"
Fix bug with nopbinary dispatch check

clone

read-only
https://git.sr.ht/~mil/limkd
read/write
git@git.sr.ht:~mil/limkd

You can also use your local clone with git send-email.

#limkd

limkd, or libinput multipress key daemon, is a simple multipress keybinding daemon to execute commands on successive presses of (or by holding) a particular key. This functionality allows you to expand the number of bindings available through pressing a single key by 1-, 2-, 3-, or n-fold.

This application was originally developed with mobile Linux and postmarketOS devices such as the Pinephone in mind; however limked may be used generically in both mobile and desktop linux environments (both X11 and Wayland) whereever libinput is available. Similar functionality exists in Sxmo, and was built out as the basis of the dwm multikey patch. The rationale of having this functionality encompassed in a standalone application is that by doing this limkd may be used in different mobile Linux environments such as targeting i3.

Sample:

limkd \
  -k "KEY_VOLUMEUP,1,st" \
  -k "KEY_VOLUMEUP,2,i3-msg focus next" \
  -k "KEY_VOLUMEDOWN,1,i3-msg workspace next" \
  -k "KEY_VOLUMEDOWN,2,i3-msg layout toggle split|tabbed" \
  -k "KEY_VOLUMEDOWN,0,i3-msg kill" \
  -k "KEY_POWER,1,pidof svkbd-mobile-intl && pkill svkbd-mobile-intl || svkbd-mobile-intl -d -l en,symbols" \
  -k "KEY_POWER,0,pidof ppxscreenlock || ppxscreenlock"

#Arguments

-d devicepath Path of the dev filesystem device to monitor (like /dev/input/event1).

The -d option can be used multiple times to monitor multiple devices.

-k keyname,ntaps,command: Add a keybinding wherein: keyname refers to the libevdev key such as KEY_A, ntaps specifies the number of taps to execute the keybinding (or may be 0 to specify a hold keybinding), and command specified the command to execute.

The -k option can be used multiple times to bind multiple kyebindings.

-tt timeouttapms Timeout milliseconds for tap registration (successive taps must be executed in less then this interval). Default ms: 120.

-th timeoutholdms Timeout milliseconds for hold registration. Default ms: 300.

-q Disable verbose mode which prints debugging messages. Note verbosity is enabled by default.

#Signals

You can pause the application's event processing by sending a USR1 signal; and conversely you can resume the application's event processing by sending a USR2 signal. When paused, limkd stops polling the associated libinput filedescriptor and thus will not interfere with other applications that may want to read from the underlying device nodes (one example is for using mlxl in combination with limkd).

#Build / Dependencies

Builds against:

  • Zig 0.12.x

Alpine Build Dependencies:

  • libevdev-dev
  • libinput-dev

#See Also

limkd was built as part of the tlml project; a project to ease the use of tiling window managers on mobile Linux devices. As a part of tlml, limkd also has a sister related application named lisgd (or libinput synthetic gesture daemon). For more information on tlml see: http://sr.ht/~mil/tlml

Do not follow this link