[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Emacs, X windows, and the alt key

Brian White <bcwhite@pobox.com> writes:

> > > On my slink system, I can use the alt key as an emacs "meta" key under
> > > X windows.  However, this does not work on my potato system.  I would
> > > like to find out whether this is a configuration mistake or a bug in
> > > potato.
> > 
> > On my potato system, I can use the key marked with a little
> > window on it as a Meta key in X Windows, but not the key marked
> > as Alt.
> That's probably because they've gone to the "correct" names in the X
> distribution.  Emacs actually wants "Meta", which has traditionally been
> mapped to the Alt key.  However, if you actually look at X, it has
> separate definitions for "Alt" and "Meta".  By assigning the Alt key
> to the "Alt" code, they are technically correct, but it is a break from
> tradition.

Yeah, it's a real pain, but it actually does work right if you guess all the
right config values for XF86Config. If you set anything wrong -- and several
parameters are counter-intuitive -- then Xkb can do various bogus things.

> Check your global Xmodmap file.  This is what I use and everything works
> as it should (or at least, as it used to) and still allows the newer
> mechanism.

In theory you don't want to be using xmodmap any more. It interacts strangely
with the Xkb system. Unfortunately as the Xkb config files appear to be
completely undocumented this leaves the user with no documented way to
configure his keyboard. A really bad situation if I may say so.

The magic solution to all your problems is probably to comment out the line
that says:
  XkbKeymap "xfree86(us)"

That's allegedly the default so it's entirely unclear to me why having that
line should break the modifier key handling, but it does, badly. In fact the
only uncommented line in my Keyboard section here is ``Protocol "Standard"''.


Reply to: