Run shell commands on Linux input device events; grab the device so X stops seeing them
Project description
linux-event-triggers
Run certain triggers when a linux event file received an event. Prevent other processes from receiving the event.
AI-generated and unreviewed.
Alternatives and prior work
kbd can remap keys for keyboards. It also supports command to run commands. I already used kbd as a separate device and didn't want to mix up another device and activity in this.
triggerhappy basically does the same thing as this program. However, when running in non-daemon mode it does not seem able to grab the event (or so claude says) and I don't really want to mess around with daemons.
Installation
pipx install linux-event-triggers
Usage
Print when a is clicked, use sudo to own the device.
evtrig $DEVICE --chown --bind "a=echo hello"
Where $DEVICE is an event device. Note that you can use udevadm to find a fixed path for the event - indexed by the usb device name rather that event*.
--chown use sudo to take ownership of the event file. By using the fixed filename.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file linux_event_triggers-0.1.0.tar.gz.
File metadata
- Download URL: linux_event_triggers-0.1.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd22f5bb80d65c793e92c988e59d0e98bcb5af530c6bcddf101d32e82c8b1ac1
|
|
| MD5 |
b5175f2503c03314db02fe9137341277
|
|
| BLAKE2b-256 |
7b8d4ab7076ff57ea0e577891a0dc6e0fe623089c02d1b568accfcf79783b483
|
File details
Details for the file linux_event_triggers-0.1.0-py3-none-any.whl.
File metadata
- Download URL: linux_event_triggers-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c78a3c2d8f4eefa2aa61b87f6546a4a3c816231ebcea3dcea8dc2c516a26bb8
|
|
| MD5 |
94e5932b8255d397449e65c2b639e46b
|
|
| BLAKE2b-256 |
91c2a3880affbf2a297d65e358755d1d79c8a8383e9a1bdf3b43921ce0d56e41
|