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

Re: Meta Alt oh my!



> > Hmm. That it only works on display :0 seems like a bug.
>
> 	Any way to confirm it's a bug?  Should I report it to XFree or
> Debian?

Normally to XFree, I'd think. Unless it's a packaging problem. They're 
responding pretty well to Bugzilla these days (with enough information). But 
it has to be an X bug, of course.

> > Put these into a file .Xmodmap:
> >
> > keycode 116 = Meta_L
> > keycode 64 = Alt_L
>
> 	I gather these are the left-hand keys?
>
> 	Mine got:
> keycode	115 = Meta_L
> keycode	108 = Meta_R
> keycode 64 = Alt_L

So, when you run xev and press the left <option/alt> key, you get something 
like this:

KeyRelease event, serial 27, synthetic NO, window 0x2200001,
    root 0x48, subw 0x0, time 71770797, (2,148), root:(574,566),
    state 0x8, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 characters:  ""

But when you press the left <apple logo/command> key, you get:

KeyRelease event, serial 27, synthetic NO, window 0x2200001,
    root 0x48, subw 0x0, time 71826060, (52,144), root:(624,562),
    state 0x40, keycode 115 (keysym 0xffe7, Meta_L), same_screen YES,
    XLookupString gives 0 characters:  ""

If so, it seems to me that Alt is Alt_L and Command is Meta_L as you wanted. 
So perhaps I'm not understanding the problem.

OK. I think I understand the problem. We're not speaking the same language. 
emacs says Meta, but it often means the <alt> key on the keyboard. X has the 
notion of Alt, Meta, Super, and Hyper, where Alt is the symbol sent when 
pressing the <alt> key and (at least for Debian) Meta when pressing the 
<Apple-logo> key.

This might be a problem where the Apple keymaps are not mapping the same as 
the do on x86. I think the <Windows-logo> key sends Super now, but it used to 
send Meta. I'll file a bug with Xfree.

In the meantime, add the following to .Xmodmap:

! Rebind keys to permit Alt key to be Meta in Emacs.
clear mod1
clear mod4
keycode 115 = Super_L
keycode 116 = Super_R
keycode 64 = Alt_L
keycode 113 = Alt_R
add mod1 = Alt_L Alt_R Meta_L Meta_R
add mod4 = Super_L Super_R


> > Then run xmodmap .Xmodmap and see if that helps in X.
>
> 	But no change whatsoever... I tried also inverting Meta and
> Alt again, it simply doesn't change a thing.  So it seems :1 solemnly
> ignores both XFree86 altwin:meta_win *and* xmodmap... eerie!

Try running it with a -display :1 option. xmodmap is display-dependant. Were 
you running the xmodmap from an xterm on display :1? If so that sounds like 
an xmodmap bug.

> > BTW, what kind of keyboard is it? (US, French, etc...)
>
> 	US.  I use it with the us_intl variant, that is, producing the
> accented characters.
>
> > 1. Select keymap from arch list
> > 4. qwerty
> > 32. US american
> > 1. Apple USB
> >
> > Then you'll see that 'mac-usb-us' is installed. Do you have something
> > else?
>
> 	Exact.
>
> 	Not only GNU Emacs continues to see Alt/Option as Meta in the
> console, I loose the accented characters I can get with 1. Standard
> followed by the US International (ISO-8859-15) keymap, us-intl.iso15.

Hmm. On the console, I can use the Alt key as emacs' M- keyprefix.

Is this what you want?

Frank



Reply to: