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

Re: How to make Alt GNU Emacs Meta?



Lo, on Saturday, January 11, Bob Proulx did write:

> Adam <ack94598@yahoo.com> [2003-01-10 22:28:14 -0800]:
> > In the current stable release of debian, GNU Emacs uses the Windows key 
> > as Meta instead of Alt.  I am told this is not true for other linux 
> > distributions or other releases of debian.  How can I fix this?  If I 
> > have to I can make an .xmodmap but I would rather not.  If there is some 
> > package I can upgrade to testing or unstable I am willing to do that.
> 
> I have noticed that too.  But it is related to the keyboard you chose
> when you installed.  If you said you had a pc102 then the windows key
> is not available and you get normal meta operation on alt.  If you
> said pc104 then it configures the windows key as meta.  I believe this
> had to do with preserving the functionality of the alt key for other
> purposes.
> 
> So presumably you could rerun 'dpkg-reconfigure' again and change the
> keyboard.  But I don't know the correct packge off of the top of my
> head.  Oh well, you can just change the configuration file by hand.
> Here is mine.

dpkg-reconfigure xserver-xfree86

And be aware that if you change a section of /etc/X11/XF86Config-4 by
hand (within the debconf-managed section), it'll get overwritten the
next time you configure the xserver-xfree86 package.  I'm not entirely
sure, but this may include package upgrades.

Another alternative: instead of messing around with your XF86Config-4
file and restarting X, you can also play around with X keymaps, by way
of xmodmap(1).  The relevant bit of my .xmodmaprc file follows.

keycode 0x73 =  NoSymbol
keycode 0x40 =  Meta_L
keycode 0x71 =  Meta_R

The first line removes the key sym associated with the left windows key,
so that hitting it effectively does nothing.  The other lines rebind the
two alt keys to act like meta.  You may also want to unbind the right
windows key; its keycode is 0x74.

Warning: this is only guaranteed to work if you chose the pc104 setting
when configuring X.  It may well have bad side effects when used with a
different keyboard type.

Richard



Reply to: