Configure multimedia keys in Slackware 12.2 and KDE
Hello,
Surely most of you know how to set up the special or "multimedia" keys in some keyboards. There are also many pages in the Internet explaining the process. However, to save you all that google-ing, I explain here the steps (I found this thread quite useful http://dev-loki.blogspot.com/2006/04...xmodmap.html): 1) First of all, the kernel must map the scan code from the key to a known key code. In some cases that mapping is already done. In other cases it is not. In order to know this, you can run a "tail -f /var/log/syslog" command as root, and press the target key(s). If you see something like this: Code:
Dec 16 17:36:58 sanson kernel: atkbd.c: Unknown key pressed (translated set 2, code 0xa6 on isa0060/serio0). Code:
#!/bin/bash Then, make your /etc/rc.d/rc.localkeys executable and put something like this in /etc/rc.d/rc.local: Code:
#!/bin/sh X key codes are not the same than kernel key codes (I have not found the correspondence between both groups of values yet :scratch:). The best way to know the X key code for any given key is running the "xev" program from X (in an X console), then pressing the target key, and taking note of the key code it logs. For an example: Code:
KeyRelease event, serial 34, synthetic NO, window 0x1600001, Taking note of those values, you should now make an /etc/X11/xinit/.Xmodmap file, like this one: Code:
! 3) The last step is setting up your configured keys in KDE. You can do it globally, in KDE Control Center -> Regional & Accessibility -> Input Actions (or also in Keyboard shortcuts), and you can also do it per application, in the settings menu. That's all :) |
I haven't tried this yet, but it looks as though a few buttons I couldn't see in xev produce output in /var/log/syslog, and I should be able to map them using your guide. I didn't really look into this, but I was (mildly) annoyed that I couldn't get keycodes for those keys. Thanks a lot!
|
All times are GMT -5. The time now is 04:32 AM. |