# 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"