Le blog de Olivier Crête

Categories

Archives

September 2006
M T W T F S S
« Aug   Oct »
 123
45678910
11121314151617
18192021222324
252627282930  

RSS 2.0


Log in

After upgrading to Xorg 7.1, my keyboard/mouse combo stopped working properly. I was using the “kbd” for the keyboard and evdev for the mouse (so I can get all 12 buttons.. yes 12 buttons). On Xorg 7.0 I had most of the stuff working, except for some buttons on the keyboard which just refused to work properly. After upgrading, all hell broke loose. And it too me a while to find out why.

So how to make it work. First, forget any smart udev rule to rename the event interface, it has to be named /dev/input/eventX (where X is a number) for it to even be opened by the driver). The man page suggests using the Name option, but its not that easy, because my combo thing creates two devices event0 with the keyboard and event1 with the mouse and multimedia keys, but both with the same Name and the driver seems to only keep one of them. So I have to create two different sections:

Section "InputDevice"
        Identifier  "Keyboard1"
        Driver      "evdev"
        Option      "Device" "/dev/input/event0"
        Option      "Name" "Logitech USB Receiver"

        Option      "CoreKeyboard"
        Option      "XkbLayout" "ca(fr)+inet(evdev)"
EndSection

Section "InputDevice"
        Identifier  "Mouse0"
        Driver       "evdev"
        Option      "Device" "/dev/input/event1"
        Option      "Name" "Logitech USB Receiver"

        Option      "SendCoreEvents"
        Option      "CorePointer"
EndSection

And then add both to the ServerLayout Section like this:

Section "ServerLayout"
        Identifier     "X.org Configured"
        Screen      0  "Screen0" 0 0
        InputDevice    "Mouse0"
        InputDevice    "Keyboard1"
EndSection

The mouse buttons also are not mapped properly, I have to use this Xmodmap file (in /etc/X11/Xmodmap on Gentoo to make it load automatically):

pointer = 1 2 3 4 5 13 14 6 7 10 11 12 8 9 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99

Updated: The previous one maps buttons 6-7 to the back/forward buttons to make them work in firefox, the following one attributes them to the horiz scroll, so that it will work in GTK+:

pointer = 1 2 3 4 5 13 14 8 9 10 11 12 6 7 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99

One other thing, the keycodes will not be mapped properly unless you get xkeyboard-config 0.8 at least and preferably the CVS (otherwise you dont get the inet(evdev)).

One last thing is missing, some of the multimedia keys on my keyboard emit layer events that are in the mouse button range, and the X code outputs them as such (like button 24 and 47…). I’m not certain of how exactly I’m going to make it work, but probably by hacking the evdev driver.

Write a comment:

: (required)

 

This page is XHTML 1.0 Strict and CSS level 3