From d99c9d3d6a47a5258e05df79205bc044f63a3391 Mon Sep 17 00:00:00 2001 From: Ali Hatami Tajik Date: Mon, 27 Feb 2023 13:43:57 +0330 Subject: [PATCH] Add mouse (hid) bind/unbind rule --- src/rules/90-hid-mouse.rules | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/rules/90-hid-mouse.rules diff --git a/src/rules/90-hid-mouse.rules b/src/rules/90-hid-mouse.rules new file mode 100644 index 0000000..b392d93 --- /dev/null +++ b/src/rules/90-hid-mouse.rules @@ -0,0 +1,11 @@ +# Following rule will take affect after binding/unbinding action of HID devices +# which is expected. These rules only take effect one time for each mouse +# insertion, removal. Actually, usb events are triggered when usb and +# usb interface are binding but hid is more specific and happen once for each +# action. change action is not used because +SUBSYSTEM=="hid", ACTION=="bind", RUN+="/usr/local/bin/changemouse.py" + +# the following line may not be needed as when we unplug a mouse it would +# automatically remove devices from the list and they need no furthur +# configuration +# SUBSYSTEM=="hid", ACTION=="unbind", RUN+="/usr/local/bin/changemouse.py" \ No newline at end of file