GNOME Bugzilla – Bug 328032
Can't bind multimedia keys
Last modified: 2006-01-22 23:23:54 UTC
As a result of bug 133815 being 'fixed' I can no longer bind the play/pause, stop, next and prev buttons on my Microsoft Natural Multimedia keyboard. This is a very annoying, and in my eyes quite a regression over functionality that has been provided by years.
Yes, it was a fix, not a 'fix'. The functionality was broken ever since it got in the control-center, because, at the same time we move the functionality from acme to the control center, users could bind shortcuts with modifiers. However, the code didn't take that into account. As a result, the problems were: - modifiers were ignored (try binding Ctrl+Alt+P to 'Play' and see your 'P' key is gone) - changing keyboard layouts using the control-center removed that key, and we didn't notice it, so it was reset - we couldn't restore the key properly Now, to fix your problem, go to Preferences->Keyboard->Layouts and select "Microsoft Natural Keyboard" (or whichever variant is closer to your version). This should match the keys on your keyboard to their keysyms without any further configuration. If this doesn't work, then you'll need to match the keys yourself (I'm sure you know how to use xev to capture a keycode). This is an example of what's required to get a new keyboard recognised. http://linux.yes.nu/diNovo/?Page=c3VtbWFyeTA3 On FC5, those files are under /usr/share/X11/xkb/ After all that's working, file 2 bugs at freedesktop.org, one for xorg to get your changes added, and one for libxklavier to have the name listed in the control-center. Now the keyboard bindings will work for everyone using the same type of keyboard, and out of the box. I know it's a pain, but it means the functionality is implemented the way it should be.
I don't quite understand, you say that the code didn't take into account modifiers, couldn't that be fixed ? I remember when I used to use acme that I had the multimedia keys bound to Ctrl+Alt+Z and it worked fine .... Anyway, thanks for the useful info on getting keyboards detected, I'll look at getting my keyboard working properly 'out of the box' :-)
Well, some keys (the ones which acme/control-center handled themselves), worked with modifiers but Play/Pause/etc. (for which we only installed keysyms) didn't take them into account at all, even if they did appear in the UI.