SuSE Linux: All versions
You want to use the extra keys on your new multimedia keyboard, but you do not know how. These keys do not have any effect out-of-the-box.
No actions have been assigned to the keycodes produced by the keys yet. You have to
take over this process by way of the program xmodmap
. To do this, first
save the keyboard layout currently active by using the command:
xmodmap -pke > ~/Xmodmap.save
Now you can use a small tool to find out the keycodes produced by your extra keys. To do
this, start the program xev
in a terminal program such as xterm or konsole.
When you press a key, you will see how xev
displays that key's keycode on
the terminal. For example, the output for the key A is:
KeyPress event, serial 23, synthetic NO, window 0x2800001, root 0x62, subw 0x0, time 3131034, (-212,59), root:(276,76), state 0x0, keycode 38 (keysym 0x61, a), same_screen YES, XLookupString gives 1 characters: "a"
As you see, the keycode for the key A is 38. Now you could, for example, edit the file Xmodmap previously saved and assign B to the keycode 38. By doing this, the result of pressing the key A would be B.
The same procedure applies for the extra keys: you can find out their keycode and assign still unused function keys (such as F13) to them. Once this is done, you can move the file Xmodmap to ~/.Xmodmap, where it will be read in everytime the graphical interface starts. Use the following command to test and reread this file:
xmodmap ~/Xmodmap.save
The reaction of your window manager/desktop environment to the new function keys may vary. For example, KDE 3.x enables you to set many different actions in its Control Center -> Look & Feel -> Key Bindings. You can also assign single applications to the new function keys in the KDE Menu Editor, which can be accessed with the right mouse button on the menu button.
An alternative would be using a program only responsible for such functions like, for example, bbkeys
.
The use of bbkeys
, included in the package bbtools
in recent versions of
SuSE Linux, is actually intended for the window manager blackbox
.
However, it also works with other window managers/desktop environments. For more information on
the configuration of bbkeys, please refer to the web site.