In Debian Linux, I need to prevent udev from creating /dev/input/event* nodes for a specific USB HID device, while still allowing it to create the /dev/hidraw* node(s)
I am aware that the event node can be "grabbed", preventing other processes from reading it, but the very presence of the node causes problems for some applications. You can argue said applications are poorly written, and I'd agree.
The fact remains that it would be very useful to prevent them from being created at all, while leaving the associated devices accessible via the raw hid interface.
I've been assuming that custom udev rules are a way to accomplish this, but so far I have been unable to come up with a rule that can target just the event nodes. Disabling the entire device, including hidraw*, seems to be much easier to do.
Am I mistaken about this even being possible?
Clarification: this is the udev monitor output when connecting a saitek joystick
KERNEL[54158.243303] add /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8.3 (usb)
KERNEL[54158.247164] add /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8.3/1-8.3:1.0 (usb)
KERNEL[54158.250979] add /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8.3/1-8.3:1.0/0003:06A3:0464.0012 (hid)
KERNEL[54158.251277] add /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8.3/1-8.3:1.0/0003:06A3:0464.0012/input/input47 (input)
KERNEL[54158.251471] add /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8.3/1-8.3:1.0/0003:06A3:0464.0012/input/input47/event21 (input)
KERNEL[54158.251683] add /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8.3/1-8.3:1.0/0003:06A3:0464.0012/input/input47/js0 (input)
KERNEL[54158.251873] add /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8.3/1-8.3:1.0/0003:06A3:0464.0012/hidraw/hidraw11 (hidraw)
KERNEL[54158.251957] bind /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8.3/1-8.3:1.0/0003:06A3:0464.0012 (hid)
KERNEL[54158.252021] bind /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8.3/1-8.3:1.0 (usb)
KERNEL[54158.252085] bind /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8.3 (usb)
UDEV [54158.259505] add /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8.3 (usb)
UDEV [54158.261152] add /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8.3/1-8.3:1.0 (usb)
UDEV [54158.261898] add /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8.3/1-8.3:1.0/0003:06A3:0464.0012 (hid)
UDEV [54158.263014] add /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8.3/1-8.3:1.0/0003:06A3:0464.0012/input/input47 (input)
UDEV [54158.264639] add /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8.3/1-8.3:1.0/0003:06A3:0464.0012/hidraw/hidraw11 (hidraw)
UDEV [54158.265277] add /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8.3/1-8.3:1.0/0003:06A3:0464.0012/input/input47/js0 (input)
UDEV [54158.403253] add /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8.3/1-8.3:1.0/0003:06A3:0464.0012/input/input47/event21 (input)
UDEV [54158.405617] bind /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8.3/1-8.3:1.0/0003:06A3:0464.0012 (hid)
UDEV [54158.411509] bind /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8.3/1-8.3:1.0 (usb)
UDEV [54158.425099] bind /devices/pci0000:00/0000:00:14.0/usb1/1-8/1-8.3 (usb)
This is typical of HID compliant input devices, and in fact virtually indistinguishable between most devices. What I need to to is allow the hidraw* node to be created, while preventing event* (and js)
It seems the event* can be manually unbound using "unbind" within /sys while leaving hidraw intact, which makes me think that udev rules should be able to produce the same end result.