itz at speakeasy.org
Thu Jun 13 16:58:41 PDT 2002
I am forced to admit I don't understand how xmodmap, or X keyboard
configuration in general, is supposed to work. None of the
documentation available goes into sufficient depth to answer my
questions (which to me seem like the first ones anyone would ask).
First, the xmodmap manpage says:
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.
The frustrating part here is "The list". What does it mean when more
than 1 keysym is listed? What determines which character among those
listed for a keycode is ultimately input and echoed when I type the
key in xterm, for example? When I do xmodmap -pm -pke (listing the
map in effect), I get stuff like this:
keycode 32 = o O
keycode 33 = p P
keycode 34 = bracketleft braceleft
keycode 35 = bracketright braceright
This would suggest (also by analogy with the Linux kernel console
keymaps) that the additional keysyms listed are bound to the event of
pressing the key together with modifier keys. However, this is
nowhere even implied in the manpage, and the output never contains
more than 2 keysyms with a particular keycode, so what of
Control-keycode, Alt-keycode and the remaining combinations, which
work fine in my apps (mostly Emacs)?
What I actually want to do is to rebind the Multi_key keysym, which by
default seems to be on the right Control key. I find that confusing
and want to have 2 identical Control keys. So I thought I would bind
Multi_key to Control-period, just as it is in the default kernel keymap.
Not being any wiser after reading about xmodmap, I tried to have
xkeycaps do it for me. I right-clicked on the period and I got a
pop-up window that looked as if my hypothesis about the list
corresponding to modifier key states was right: there was a column of
keysyms on the left, of which only the first 2 were defined, and a
column of modifiers on the right, the first 3 of which were "none",
"shift", and "control". I selected the 3rd row and entered
"Multi_key". I had xkeycaps write the output to a file and pasted the
relevant piece into my ~/.Xmodmap file:
keycode 60 = period greater Multi_key
After restarting X (not just my session, but xdm as well, to be sure)
I confirmed that my startup scripts grokked the new .Xmodmap by
running xmodmap -pm -pke again. The above line was there. Running
xkeycaps I and clicking on the period I can now see 3 defined rows in
the bindings window.
But it doesn't work! Control-period produces just a period in xterm,
and Emacs beeps and says "Control-. is undefined" - which just means,
of course, that it got no special X event for the keystroke, it just
saw a period like xterm did.
Where are you, my glory days of text mode? :-(
Ian Zimmerman, Oakland, California, U.S.A.
GPG: 433BA087 9C0F 194F 203A 63F7 B1B8 6E5A 8CA3 27DB 433B A087
EngSoc adopts market economy: cheap is wasteful, efficient is expensive.
More information about the buug