Determine order of input devices
When I start my laptop with a USB mouse attached, that mouse always becomes /dev/input/mouse0. When I unplug it for a short while and plug it in again, it becomes mouse2. mouse1 is the touchpad.
In my xorg.conf I specified different rules for the touchpad and the USB mouse, so neither /dev/input/mice nor mouse2 will work. I.e. after being unplugged, the USB mouse won't work till the next reboot.
I think it is generally wrong that the external mouse should have the lower number. The touchpad should be mouse0 since it can never be removed. I guess if the order was exchanged in that way, the USB mouse would always be mouse1, well at least I hope so.
I guess I could change the order by building the USB mouse driver as a module, but is that the only way?
In addition to the regular /dev/input/mouse* device nodes, udev also creates permanent device-specific links in /dev/input/by-id and /dev/input/by-path. And simple rules can be added to make it create more-easily-named shortcuts as well. I think you should be able to use those if always want the same device to be detected.
For more on udev rules:
|All times are GMT -5. The time now is 05:37 PM.|