LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   keyboard multimedia keys (https://www.linuxquestions.org/questions/linux-general-1/keyboard-multimedia-keys-465499/)

devit 07-19-2006 06:24 AM

keyboard multimedia keys
 
I have a keyboard that has some multimedia keys, like WWW, search, Vol-, Vol+, mute... and I would like to activate these keys. The system I use is openSUSE 10 with KDE 3.4. On the same system, but using GNOME I managed to activate these keys in Desktop->GNOME Control Center->Shortcuts. There, by clicking the Volume mute field in the table I get a message "New accelerator", then I press the "Mute" key on my keyboard and the field is filled with the value 0xa0. I've done the same with all the other keys and it worked. Do you know how could I activate these keys on KDE? I've tried in Control Center->Regional&Accessibility->Keyboard Shortcuts but when I select something like Copy and try to replace the Ctrl+C by pressing my "Copy" key nothing happens(if I press Alt+W it works). So, what should I do to make this keys functional?
Thanks!

David the H. 07-19-2006 04:26 PM

You need to use xmodmap to map the keycodes to keynames before kde can recognize them. This page has a pretty good rundown on how to do it:

http://cweiske.de/howto/xmodmap/allinone.html

The hardest part for me was finding useful keybindings. If you just want multimedia functions, the XF86Audio* codes should be fine, but you can bind them to other codes for different functions. There's a list of usable keynames in the XKeysymDB file, which was in /usr/share/X11 on my system. When I tried XF86AudioMute for one of my keys, it would automatically start kmix and mute my sound with it for me even before I configured anything else. Well, I didn't want that, and I couldn't find how to change it, so I decided to use XF86Launch0 instead (which doesn't seem to do anything on my system), and used Control Center to bind the key to something else (I ended up setting my buttons to switch between virtual desktops).

I personally had some trouble getting the .Xmodmap file to load at startup myself, since I don't use the kdm login manager. I finally just added a short launch script to the kde Autostart folder and now it all works.

If you want to go the lazy route and don't mind having another daemon running, then check out lineak (and lineakconfig) instead. It provides an easy way to set up multimedia keys.


All times are GMT -5. The time now is 09:44 PM.