Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] XEmacs Alt Key Bug

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: David McNab <david AT rebirthing.co.nz>
  • To: Casey Harkins <charkins AT upl.cs.wisc.edu>
  • Cc: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] XEmacs Alt Key Bug
  • Date: 12 Aug 2002 18:58:26 +1200

Thanks to all who responded to my call for help.

As it happens, no amount of xmodmap'ing seems to stop emacs from
interpreting Alt as Meta.

But I did find a workaround.

In .Xmodmaprc, I swapped things over, so that ALT keypresses actually
generate Super_R, and logo keys generate Alt.

Then, I assigned Super_R to mod1, and Alt_R to mod4.

Result? The 'logo' key (with the M$ trademark) now generates the M-
prefix in Emacs, and Alt now generates the S- (super) prefix.

All I've had to change is to use 'super' as the prefix name for handling
alt keys, eg (global-set-key '(super \c) 'copy-region-as-kill)

My .Xmodmap entries appear below:

! swapped - these normally generate Alt
keycode 64 = Super_R
keycode 113 = Super_R

! swapped - these normally generate 'Logo' key
keycode 115 = Alt_R
keycode 116 = Alt_R

add mod1 = Super_R
add mod4 = Alt_R

Cheers
David



On Mon, 2002-08-12 at 04:39, Casey Harkins wrote:
> This can be fixed with xmodmap. From the xmodmap man page:
> ----
> Many applications support the notion of Meta keys (similar to
> Control keys except that Meta is held down instead of Control). However,
> some servers do not have a Meta keysym in the default keymap table, so one
> needs to be added by hand. The following command will attach Meta to the
> Multi-language key (sometimes labeled Compose Character). It also takes
> advantage of the fact that applications that need a Meta key simply need
> to get the keycode and don't require the keysym to be in the first column
> of the keymap table. This means that applications that are looking for a
> Multi_key (including the default modifier map) won't notice any change.
>
> % xmodmap -e "keysym Multi_key = Multi_key Meta_L"
>
> Similarly, some keyboards have an Alt key but no Meta key. In that
> case the following may be useful:
>
> % xmodmap -e "keysym Alt_L = Meta_L Alt_L"
> ----
> This last command is probably what you'll want to use. You can add this to
> your ~/.xsession or ~/.xinitrc before the window manager starts, OR you
> can add just the stuff between the quotes into ~/.Xmodmap (this assumes
> the xinitrc or xsession are loading this file.
>
> Hope this helps. The 'xev' utility can be useful for showing what X
> interprets a key stroke as.
>
> -casey
>
>
> On 12 Aug 2002, David McNab wrote:
>
> > On Mon, 2002-08-12 at 02:32, Robin wrote:
> > > On Mon, Aug 12, 2002 at 02:14:01AM +1200, David McNab wrote:
> > > > Just one painful problem - in XEmacs, the Alt key is being interpreted
> > > > as a Meta key.
> > > Hrm, I always thought that the two were synonomous (Alt-x being M-x).
> > > Anyway, this reminds me of a couple of similar problems I am haveing.
> >
> > Well, they're no more identical than '3' and 'W'.
> >
> > Anyway, I've noticed that my right-logo key hasn't been molested by
> > sourceMage, so I'm using that instead of Alt.
> > But it's still not right - I'm unable to use one-handed key combinations
> > for keys on the left end of the keyboard, eg Alt-Q or Alt-R. The left
> > logo key doesn't do anything.
> >
> > So, to whoever set up the XEmacs spell, or anyone with good X or Emacs
> > expertise, I'd really appreciate some simple advice on how to correct
> > this problem.
> >
> > Thanks so much
> > David
> >
> > >
> > > I have the dvorak key layout, and when I use that mode, there is no
> > > right-alt. It seems to cause some kind of modification, but I'm not sure
> > > what. I can switch back to US qwerty layout, and it appears again.
> > >
> > > I have also lost alt-tab in KDE, no matter what mode (or alt key) I use.
> > > Simply, nothing happens
> > >
> > > --
> > > Robin <robin AT kallisti.2y.net> JabberID:
> > > <eythian AT jabber.org>
> > >
> > > Hostes alienigeni me abduxerunt. Qui annus est?
> > >
> > > PGP Key 0x768B8765 Fingerprint=33C8 EA9C 61F1 F117 EEED 24A5 3BCE 4F77
> > > 768B 8765
> >
> >
> > _______________________________________________
> > SM-Discuss mailing list
> > SM-Discuss AT lists.ibiblio.org
> > http://lists.ibiblio.org/mailman/listinfo/sm-discuss
> >
>
> _______________________________________________
> SM-Discuss mailing list
> SM-Discuss AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/sm-discuss






Archive powered by MHonArc 2.6.24.

Top of Page