I have a joystick that affercts the mouse when plugged in, I found the xinput command that fixes it; I want to wright a udev rule to execute it when the js is plugged.
it doesn't work, please help...
Code:
US=="usb", SYSFS{idVendor}=="046d", SYSFS{idProduct}=="c21e", ACTION=="add", RUN+="/usr/bin/xinput set-prop 'Generic X-Box pad' 'Generate Mouse Events' 0"
Code:
$ udevadm info -q all -n /dev/input/js0 P: /devices/pci0000:00/0000:00:1a.2/usb5/5-2/5-2:1.0/input/input9/js0 N: input/js0 S: char/13:0 S: input/by-id/usb-Logitech_Rumble_Gamepad_F510_89CAD520-joystick S: input/by-path/pci-0000:00:1a.2-usb-0:2:1.0-joystick E: UDEV_LOG=3 E: DEVPATH=/devices/pci0000:00/0000:00:1a.2/usb5/5-2/5-2:1.0/input/input9/js0 E: SUBSYSTEM=input E: DEVNAME=input/js0 E: ID_INPUT=1 E: ID_INPUT_JOYSTICK=1 E: ID_VENDOR=Logitech E: ID_VENDOR_ENC=Logitech E: ID_VENDOR_ID=046d E: ID_MODEL=Rumble_Gamepad_F510 E: ID_MODEL_ENC=Rumble\x20Gamepad\x20F510 E: ID_MODEL_ID=c21e E: ID_REVISION=2020 E: ID_SERIAL=Logitech_Rumble_Gamepad_F510_89CAD520 E: ID_SERIAL_SHORT=89CAD520 E: ID_TYPE=generic E: ID_BUS=usb E: ID_USB_INTERFACES=:ff5d01: E: ID_USB_INTERFACE_NUM=00 E: ID_USB_DRIVER=xpad E: ID_PATH=pci-0000:00:1a.2-usb-0:2:1.0 E: MAJOR=13 E: MINOR=0 E: DEVLINKS=/dev/char/13:0 /dev/input/by-id/usb-Logitech_Rumble_Gamepad_F510_89CAD520-joystick /dev/input/by-path/pci-0000:00:1a.2-usb-0:2:1.0-joystick E: TAGS=:udev-acl: