Solved: confused about XEmacs and xmodmap

Pete Siemsen <[email protected]> Fri, 23 Apr 2004 17:11:33 -0600
Newsgroups gmane.emacs.xemacs.general
Message-ID <[email protected]>
Thanks to Giacomo Boffi, Stephen J. Turnbull, and Glynn Clements for
quickly providing solutions to my query.  Adding

  remove Mod4 = Super_L
  remove Mod4 = Super_R

to my .Xmodmap file solved it.

> Been using XEmacs happily for years.  Recently I upgraded to XEmacs 21.5
> beta17 and XFree86 4.3.  Now XEmacs works fine, but emits these warnings
> when it starts:
> 
>   (1) (key-mapping/warning) 
>         The meanings of the modifier bits Mod1 through Mod5 are determined
>         by the keysyms used to control those bits.  Mod1 does NOT always
>         mean Meta, although some non-ICCCM-compliant programs assume that.
>   
>   (2) (key-mapping/warning) 
>         The semantics of the modifier bits ModShift, ModLock, and ModControl
>         are predefined.  It does not make sense to assign ModControl to any
>         keysym other than Control_L or Control_R, or to assign any modifier
>         bits to the "control" keysyms other than ModControl.  You can't
>         turn a "control" key into a "meta" key (or vice versa) by simply
>         assigning the key a different modifier bit.  You must also make that
>         key generate an appropriate keysym (Control_L, Meta_L, etc).
>   
>   (3) (key-mapping/warning) XEmacs:  Control_R (0x74) generates Mod4,
>   which is nonsensical.
>   
>   (4) (key-mapping/warning) XEmacs:  Control_L (0x73) generates Mod4,
>   which is nonsensical.
>   
> I have a .Xmodmap file in my home directory.  When I renamed the file to
> something bogus, restarted X and restarted XEmacs, I didn't get the
> warnings, so they are caused by something in my .Xmodmap file.  That
> narrows it down a bit.
> 
> I set up my .Xmodmap file map to map some of the strange keys on my
> keyboard into useful keys.  Specifically, my "DvortyBoard" has the usual
> right and left "Ctrl" keys, which work as expected - they generate X
> keysyms named "Control_R" and "Control_L".  Next to each "Ctrl" key is a
> 
> key with a funny symbol that looks like a window with 4 panes.  I
> sometimes hit these keys by accident when I mean to hit a "Ctrl" key, so
> I use xmodmap to make these keys be the same as the "Ctrl" keys.  I used
> the xev program to discover that the keys generate the X keycodes 115
> and 116.  My .Xmodmap file contains
> 
> remove Control = Control_L
> keycode 115 = Control_L
> add Control = Control_L
> remove Control = Control_R
> keycode 116 = Control_R
> add Control = Control_R
> 
> Worked fine in XFree86 4.2.1, where the keycodes were mapped to nothing.
> In my new XFree86 4.3.0, they are mapped to the keysyms "Super_R" and
> "Super_L", and XEmacs displays the warning paragraphs.  The keys still
> work as I intend inside and outside of XEmacs - they work like "Ctrl"
> keys.
> 
> I confess to being overwhelmed by the complexity of the X modmap
> system.  Can anyone explain what's wrong, if anything?

-- Pete