-- "Stephen J. Turnbull" <turnbull(a)sk.tsukuba.ac.jp> spake thusly:
For historical reasons, XEmacs looks for a Meta key, then an Alt
key.
It binds Meta commands to the X11 modifier bit attached to the first
of these it finds. On PCs, the Windows key is often assigned the Meta
bit, but many desktop environments go to great lengths to get all apps
to use the Alt key, and reserve the Windows key to (sensibly enough)
the window manager.
One correct way to implement this was suggested on comp.emacs.xemacs
(by Kilian Foth and in more detail by Michael Piotrowski): unmap the
Meta modifier using xmodmap or xkb, and then map the Meta/Windows key
to the Super or Hyper keysym and an appropriate mod bit. XEmacs will
not find the Meta keysym, and default to using the Alt key for Meta
keybindings. Typically few applications use the (X11) Meta modifier;
it is tedious but not too much so to teach the ones you need to use
Super instead of Meta. There may be further useful hints in the
discussion of keymapping on non-Linux platforms.
The solution I've used for this is to use the following mappings:
Key Sym
Window -> Hyper_L/R
Alt -> Meta_L/R & Alt_L/R
Menu -> Super_R
Hyper and Super are reserved for WM-related functionality.
I know a number of people probably find the concept of mapping the Alt
keys to both Alt and Meta distasteful, but it's worked out fine for me
(without having to use Mandrake's Meta/Alt patch) and has never caused
me any problems. Conceivably if an app ever provides different
functionality for Alt vs. Meta this might be a problem, but I haven't
run across one yet (although the proposed menu bindings for XEmacs may
be an example).