If it ever seems that keystrokes are not working correctly, you can
check current keysym settings by running xmodmap
with the -pk argument. Use the
xev client to determine exactly which key code a
key generates on your display. There is also a public domain client
called xkeycaps that can be used to display the
keysyms for selected keyboards.
You can use xmodmap to add or remove keysyms, or
even to redefine the key code associated with that keysym. You can
also use it to redefine the mouse buttons, using the
pointer keyword. For example, to have the second
and third mouse button switch places, you can enter:
% xmodmap -e "pointer = 1 3 2"
If you have a large number of keys to remap, you can put the commands
in a file that is read when your X session starts. For example,
create a file called .Xmodmap:
! my .Xmodmap file
remove Lock = Caps_Lock
remove Control = Control_L
keysym Control_L = Caps_Lock
keysym Caps_Lock = Control_L
add Lock = Caps_Lock
add Control = Control_L
...
...
xset b 10 100 10
xrdb $HOME/.Xdefaults
xmodmap $HOME/.Xmodmap
fvwm &
...
Alternately, you might want to assign different functions to
little-used keys, such as making the tiny
"enter" key on Powerbook keyboards
into another command key. Remember, too, that some keys may have
different names than what you're used to. Sun
keyboards, for example, often come with a
"meta" key; Macintosh keyboards
have an "option" key where PC users
expect to find "alt" (though they
act the same); and so forth.