LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Determine order of input devices (http://www.linuxquestions.org/questions/linux-hardware-18/determine-order-of-input-devices-534976/)

DeNayGo 03-06-2007 02:52 AM

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?

David the H. 03-07-2007 12:23 AM

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:
http://www.reactivated.net/writing_udev_rules.html


All times are GMT -5. The time now is 01:20 PM.