xkb database broken

Cameron Hutchison lists at xdna.net
Fri Jun 16 14:56:34 BST 2006


I've been trying to figure out why both my laptop and desktop (both
running dapper) are having problems with multimedia keys not working and
I've traced it back to the xkb database.

I should probably post this message to the fd.o xkb mailing list but
wanted to bounce it off the devs here first, since I've only started
encountering this problem since upgrading my breezy laptop and
re-installing what was my debian sid desktop with dapper.

The file /etc/X11/xkb/symbols/inet defines the keyboard models that I
have selected for my machines. My desktop uses the "logicdit" model and
the laptop uses the "inspiron" model.

The "logicdit" model is defined the same as the "logitech_base" model.
The problem with this is from these two lines:
    key <I2F> { [ XF86AudioRaiseVolume ] };
    key <I30> { [ XF86AudioRaiseVolume ] };

The "inspiron" model is giving me problems with these lines:
    key <I02>   {       [ XF86AudioStop         ]       };
    key <I04>   {       [ XF86AudioNext         ]       };
    key <I10>   {       [ XF86AudioPrev         ]       };
    key <I19>   {       [ XF86AudioNext         ]       };
    key <I22>   {       [ XF86AudioPlay, XF86AudioPause ] };
    key <I24>   {       [ XF86AudioStop         ]       };
    key <NFER>  {       [ XF86AudioPrev         ]       };
    key <XFER>  {       [ XF86AudioPlay, XF86AudioPause ] };

These lines are defining multiple keycodes for the same keysyms. This
causes problems with gnome-settings-daemon as it is configured with the
names of the keysyms (from the gconf key
/apps/gnome_settings_daemon/keybindings). Since gnome-settings-daemon
looks up the keycode by keysym, it is finding the first of the duplicate
definitions above. However the keys on my keyboards generate the
keycodes of the second of the duplicates.

In gnome-settings-multimedia-keys.c of gnome-settings-daemon where it
implements init_kbd() it parses the KeySym name string to get the
keycode and keysym values. It then calls grab_key which places a grab
based on the keycode. Since my keyboards are generating different
keycodes from what is being grabbed, it fails.

I'm assuming that rhythmbox is doing something similar, since it ignores
the duplicate keysyms on my laptop.

Searching the bug database for "multimedia keys" turn up a number of
bugs that may be related to this. I wanted to discuss this here first to
see if people thought it was related.




More information about the ubuntu-devel mailing list