How can I turn an XInput2 device, e.g. as reported by XIQueryDevice
, into an appropriate sysfs
node? The device is a generic HID device, handled by the evdev
input driver.
I know I can get the name
of the device. I might be able to look at the Xorg.0.log
and try to find the appropriate log message of when this device was added, hoping that it mentions the /dev/input/event*
device node associated with that. Or I could look at all input events in sysfs
, look for one with that name, and hope that the name is unique and identical with the one reported via XInput. But I hope there is a cleaner solution than either of these.