diff options
Diffstat (limited to 'kvm-input.rules')
-rw-r--r-- | kvm-input.rules | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/kvm-input.rules b/kvm-input.rules new file mode 100644 index 0000000..d1e6ec1 --- /dev/null +++ b/kvm-input.rules @@ -0,0 +1,20 @@ +# File: /etc/udev/rules.d/kvm-input.rules +# Location: vm2 +# Author: bgstack15 +# Startdate: 2023-01-11-4 11:18 +# Title: Udev rule for detecting kvm switched input +# Project: kvm-mapping +# Purpose: run script when my USB keyboard is plugged in, i.e., when the kvm is switched to this output +# History: +# Usage: +# After making changes: `sudo udevadm control --reload` +# Reference: +# IBM Corp. SK-8815 keyboard that is on my USB kvm +# lsusb +# https://superuser.com/questions/305723/using-udev-rules-to-run-a-script-on-usb-insertion +# Improve: +# Documentation: +# This invokes the script three times, so the trigger script must look for DEVTYPE="usb_device" because I couldn't find a way to do that here with an ATTRS +# Dependencies: +# /usr/local/bin/kvm-udev-trigger.sh +ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="04b3", ATTRS{idProduct}=="301b", RUN+="/usr/local/bin/kvm-udev-trigger.sh" |