making evdev play nice with udev

martin at diers.us martin at diers.us
Sat Sep 25 09:21:57 PDT 2004


It seems to me that the current evdev driver needs to be enhanced such
that the "Device" line can be used to point to an actual event device,
rather than using the "Dev Phys" and/or "Dev Name" options to locate the
device. The reason? If UDEV is used, and rules are written such that the
event device for a given mouse/keyboard are always located at the same
place, this may reliably be used instead of searching for the device by
name and physical location.

This approach would give the evdev driver more flexibility, and allow it
to distinguish between devices that at present it cannot.

For example: I have two different USB wireless mice. One is a trackball
which requires an "AngleOffset" option. The other is a regular mouse that
does not. Both devices are named "Logitech USB Receiver". At present, I am
forced to edit xorg.conf and comment or uncomment the "AngleOffset" line.
This is annoying.

The mouse may be plugged into various USB ports, so you cannot rely upon
the name, nor the physical location as being consistent from time to time.
However, a UDEV rule I have written reliably creates a symlink of
/dev/input/wirelessmouseev for the mouse, and
/dev/input/wirelesstrackballev for the trackball. If evdev would allow you
to specify a device rather than a physical location, I could take
advantage of the UDEV rule. As it stands, there is no way for evdev to
distinguish between the devices unless I consistently plug the devices
into different ports (which I am rarely focused enough to do).

Does any of this make sense or am I on the wrong track here?

Martin Diers





More information about the xorg mailing list