[15129] in Athena Bugs

home help back first fref pref prev next nref lref last post

Re: Athena Solaris machines have funky modifiers

daemon@ATHENA.MIT.EDU (Jered J Floyd)
Fri May 2 01:29:55 1997

To: Greg Hudson <ghudson@MIT.EDU>
Cc: bugs@MIT.EDU
From: Jered J Floyd <jered@MIT.EDU>
Date: 02 May 1997 01:29:50 -0400
In-Reply-To: Greg Hudson's message of Thu, 1 May 1997 17:32:06 -0400


Greg Hudson <ghudson@MIT.EDU> writes:
> It sounds to me like Xemacs is making the bad assumption that
> modifiers are tied to keysyms, rather than to modifier bits.  Does
> regular emacs make any such assumption?

It appears that XEmacs is trying to be ICCCM compliant, while we
aren't. (In particular, it claims that it's illegal for a keysym to be
associated with more than one modifier bit.)  Appended is the relevant
portion of event-Xt.c that explains this. So, is there some particular
reason that Athena doesn't use the default Solaris modmap?

--Jered

/* X bogusly doesn't define the interpretations of any bits besides
   ModControl, ModShift, and ModLock; so the Interclient Communication
   Conventions Manual says that we have to bend over backwards to figure
   out what the other modifier bits mean.  According to ICCCM:

   - Any keycode which is assigned ModControl is a "control" key.

   - Any modifier bit which is assigned to a keycode which generates Meta_L
     or Meta_R is the modifier bit meaning "meta".  Likewise for Super, Hyper,
     etc.

   - Any keypress event which contains ModControl in its state should be
     interpreted as a "control" character.

   - Any keypress event which contains a modifier bit in its state which is
     generated by a keycode whose corresponding keysym is Meta_L or Meta_R
     should be interpreted as a "meta" character.  Likewise for Super, Hyper,
     etc.

   - It is illegal for a keysym to be associated with more than one modifier
     bit.

   This means that the only thing that emacs can reasonably interpret as a
   "meta" key is a key whose keysym is Meta_L or Meta_R, and which generates
   one of the modifier bits Mod1-Mod5.

   Unfortunately, many keyboards don't have Meta keys in their default
   configuration.  So, if there are no Meta keys, but there are "Alt" keys,
   emacs will interpret Alt as Meta.  If there are both Meta and Alt keys,
   then the Meta keys mean "Meta", and the Alt keys mean "Alt" (it used to
   mean "Symbol," but that just confused the hell out of way too many people).

   This works with the default configurations of the 19 keyboard-types I've
   checked.

   Emacs detects keyboard configurations which violate the above rules, and
   prints an error message on the standard-error-output.  (Perhaps it should
   use a pop-up-window instead.)
 */

home help back first fref pref prev next nref lref last post