Skip to content

Instantly share code, notes, and snippets.

@ursm
Last active March 20, 2019 22:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ursm/13f53c61f3759d4aba3e18af55eb7b6b to your computer and use it in GitHub Desktop.
Save ursm/13f53c61f3759d4aba3e18af55eb7b6b to your computer and use it in GitHub Desktop.
ACTION=="add", ENV{ID_INPUT_KEYBOARD}=="1", ENV{DEVPATH}!="/devices/virtual/input/*", TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/sys/devices/virtual/input/%k", RUN+="/bin/systemctl --no-block start oneshot-modifier@%k.service"
[Unit]
BindsTo=sys-devices-virtual-input-%i.device
[Service]
ExecStart=/home/ursm/src/github.com/ursm/oneshot-modifier/oneshot-modifier /dev/input/%I
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment