Markus.Kuhn at cl.cam.ac.uk
Wed Jul 18 02:32:15 PDT 2007
I used to be able to get the adiaeresis and Adiaeresisa keysyms (German
umlauts) onto the AltGr-a and AltGr-A keys of a UK keyboard with
xmodmap -e 'keysym a = a NoSymbol adiaeresis NoSymbol'
exactly as "man xmodmap" suggests.
However, on modern systems (e.g., openSUSE 10.2 with KDE, Fedora Core 6,
etc.) I discovered only after a lot of experimentation, and no help from
any documentation that I could find, that this line has to be changed to
xmodmap -e 'keysym a = a NoSymbol a NoSymbol adiaeresis Adiaeresis'
In other words, the AltGr level has mysteriously moved from the 3rd and
4th to the 5th and 6th keysym position in .Xmodmap files, and has also
lost the automatic case mapping provided by NoSymbol.
This obviously contradicts what "man xmodmap" claims:
keycode NUMBER = KEYSYMNAME ...
The list of keysyms is assigned to the indicated keycode
(which may be specified in decimal, hex or octal and can be
determined by running the xev program). Up to eight keysyms
may be attached to a key, however the last four are not used
in any major X server implementation. The first keysym is
used when no modifier key is pressed in conjunction with this
key, the second with Shift, the third when the Mode_switch
key is used with this key and the fourth when both the
Mode_switch and Shift keys are used.
What is going on here? Why does this happen under KDE, but not under fvwm/
Is this a bug in the keyboard code or a bug in the xmodmap manpage?
Where does one start reading documentation these days in order to
understand X11 keyboard handling end-to-end if the man pages are out of
$ xmodmap -pm
xmodmap: up to 4 keys per modifier, (keycodes in parentheses):
shift Shift_L (0x32), Shift_R (0x3e)
control Control_L (0x25), Control_R (0x6d)
mod1 Alt_L (0x40), Alt_L (0x7d), Meta_L (0x9c)
mod2 Num_Lock (0x4d)
mod4 Super_L (0x73), Super_R (0x74), Super_L (0x7f), Hyper_L (0x80)
mod5 Mode_switch (0x5d), ISO_Level3_Shift (0x7c)
$ sed /etc/X11/xorg.conf -ne '/^Section "InputDevice"/,/^EndSection/p'
Option "Protocol" "Standard"
Option "XkbLayout" "gb"
Option "XkbModel" "pc105"
Option "XkbRules" "xfree86"
Markus Kuhn, Computer Laboratory, University of Cambridge
http://www.cl.cam.ac.uk/~mgk25/ || CB3 0FD, Great Britain
More information about the xorg