Rhythmbox control keys not working
Cameron Hutchison
lists at xdna.net
Fri Jun 16 06:08:08 UTC 2006
The media control hotkeys on my laptop do not work (those keys are the
play/pause, stop, prev and next hotkeys). My laptop is a Dell Inspiron
8500. I have selected "Laptop/notebook Dell Inspiron 6xxx/8xxx" model
from System -> Preferences -> Keyboard -> Layouts (tab).
I think I have tracked the problem down to the xkb definition for that
keyboard model, but I dont know enough about xkb to fix it.
xmodmap tells me what is wrong:
$ xmodmap -pke | grep XF86Audio
keycode 129 = XF86AudioPlay XF86AudioPause
keycode 130 = XF86AudioStop
keycode 131 = XF86AudioPrev
keycode 132 = XF86AudioNext
keycode 144 = XF86AudioPrev
keycode 153 = XF86AudioNext
keycode 160 = XF86AudioMute
keycode 162 = XF86AudioPlay XF86AudioPause
keycode 164 = XF86AudioStop
keycode 174 = XF86AudioLowerVolume
keycode 176 = XF86AudioRaiseVolume
The problem is those duplicated keysyms for different keycodes. If I
remove the keycodes 129, 130, 131 and 132 (which are not correct
according to xev - the keys actually generate the other set of key
codes), rhythmbox now responds properly to the keys.
$ xmodmap -e 'keycode 129=' -e 'keycode 130=' -e 'keycode 131=' \
-e 'keycode 132='
Looking in /etc/X11/xkb/symbols/inet, the keyboard model "inspiron" is
defined with two sets of XF86Audio* keys. Tracing the keycodes through
to /etc/X11/xkb/keycodes/xfree86 confirms a set of keycode to keysym
mappings that matches the output of xmodmap shown above.
I *think* the reason rhythmbox does not work with the duplicated set of
keycodes/keysyms is related to the following output from xev(1) when
the play/pause button is pressed:
KeyPress event, serial 38, synthetic NO, window 0x3a00001,
root 0x107, subw 0x3a00002, time 3681627627, (41,39), root:(810,876),
state 0x0, keycode 162 (keysym 0x1008ff14, XF86AudioPlay), same_screen YES,
XKeysymToKeycode returns keycode: 129
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
The line "XKeysymToKeycode returns keycode: 129" disappears when I remove
the duplicate keysyms.
Does anyone have any ideas whats going on here, and how to fix it?
PS. I know I could put the xmodmap command in my login sequence to clear
those keycodes, but I'm looking for something more elegant that could
actually be a fix to go into ubuntu so the next person doesn't have to
try to figure this out.
More information about the ubuntu-users
mailing list