9.4.11 Keymaps and pointer button mappings in X
The xmodmap
program is used to edit and display the keyboard
modifier map and keymap table that are used by client applications to convert
event keycodes into keysyms in X.
$ xmodmap -pm
... display the current modifier map
$ xmodmap -pk | pager
... display the current keymap table
$ xmodmap -e "pointer = 3 2 1" # set mouse for the left hand.
$ xmodmap ~/.xmodmaprc # set keyboard as in ~/.xmodmaprc
It is usually run from the user's session startup script,
~/.xsession
.
To get the keycode, run xev
in X and press keys. To
get the meaning of keysym, look into the MACRO definition in
/usr/include/X11/keysymdef.h
file. All the #define
statements in this file are named as XK_ prepended to the
keysym names.
See xmodmap(1x)
.