You are not logged in.

#1 2006-11-08 18:21:11

ndlarsen
Member
From: Denmark
Registered: 2005-11-02
Posts: 157

udev rules + evdev events

Hey.

So, I have been making an udev rule to force my logitech mx510 to be mapped as event9, as it from time to time switched between event1 and event2 if I did not. I have finally got it working, however, there is still a single thing which bothers me.
Now, gpm and X gladly accepts it as event9 and the output from ls /dev/input shows the event9 node but cat /proc/bus/input/devices claims it is event2 (which is what it is how it is defined most of the time without an udev rule), eventhough there is no event2 node present. This might be a minor issue but it really bothers the control freak in me. If anyone has a solution to this or would care to explain to me why this is so, I would appreciate it. For the reference, here is the udev rule I have written and named as 10-mx510.rules:

KERNEL=="event[0-9]*", ATTRS{name}=="PS2++ Logitech MX Mouse", NAME="input/event9"

Cheers.

EDIT:

Seems I was a bit too soon on claiming that gpm accepted event9, it does not, nor event2.


I made it long
as I lacked the time to make it short...

Offline

#2 2006-11-08 19:06:34

paranoos
Member
From: thornhill.on.ca
Registered: 2004-07-22
Posts: 442

Re: udev rules + evdev events

instead of renaming your /dev/input/event# entries, you can simply give the name of your mouse device in your xorg.conf.

So, instead of Option "Device" "/dev/input/event9" you should have Option "Name" "PS2++ Logitech MX Mouse"

that's the official way of providing event devices in xorg.

Offline

#3 2006-11-08 19:28:29

ndlarsen
Member
From: Denmark
Registered: 2005-11-02
Posts: 157

Re: udev rules + evdev events

Right, that leaves out the need to fiddle with udev rules, cheers. Wonder why I did not think of that.
So, the NAME option of the udev rule just renames the node?


I made it long
as I lacked the time to make it short...

Offline

Board footer

Powered by FluxBB