Re: xmodmap, readline, and ye olde meta key
Re: xmodmap, readline, and ye olde meta key
- Subject: Re: xmodmap, readline, and ye olde meta key
- From: Jeremy Huddleston <email@hidden>
- Date: Fri, 31 Dec 2010 14:15:19 -0800
On Dec 31, 2010, at 12:56, Ambrose LI wrote:
> 2010/12/31 Jeremy Huddleston <email@hidden>:
>>
>> On Dec 31, 2010, at 04:34, Richard Cobbe wrote:
> [stuff deleted]
>>> If by "alt" you mean "command", then this works right out of the box (but
>>> see below). If by "alt" you mean "option", then additional effort is
>>> necessary. I don't know that I agree with Jeremy that .inputrc is the
>>> right place to do this
>>
>> Because that's exactly the place as defined by readline(3)'s INITIALIZATION FILE section. From radline(3):
>>
>> forward-word (M-f)
>> Move forward to the end of the next word. Words are composed of alphanumeric characters (let-
>> ters and digits).
>> backward-word (M-b)
>> Move back to the start of the current or previous word. Words are composed of alphanumeric
>> characters (letters and digits).
>
> No, that is not what it says. It says "Meta", which the Mac keyboard
> does *not* have (nor does the PC keyboard).
Right, the Mac keyboard has "Command" which has no equivalent in X11. This "Command" key except is nearly 100% functionally equivalent to "Meta" as it is used in OS X, it is in the same keyboard location as "Meta", and is thus the logical choice for Meta. Furthermore, the "Command" key on Mac keyboards sends the exact same keycode as "Meta", so if you really want to get picky, the only difference is the symbol. And guess what, I use a Type 6 keyboard, so I don't have that problem, it's already a diamond.
Furthermore, Alt (which is named "Option" on some Mac keyboards) is the correct choice for Alt because ... well... that is what it is. We had tons of debate here about whether Alt should be Alt or AltGr (Mode_switch), so you now have an option in preferences to make that choice. Expert users can still do whatever they want with ~/.Xmodmap, but the default is not going to change. Meta/Command will be X11's Meta, Option/Alt/AltGr will be X11's Alt/Mode_switch
> In terms of functionality
> mapping, certainly bash treats it as a control key which would imply
> that it should be mapped to Command, but before that "Meta" was
> traditionally used to get alternate characters and so it ought to be
> "Option".
Uhm... no. I think you are confusing with AltGr. I provided URL references for a reason:
http://en.wikipedia.org/wiki/AltGr_key
"""
In Mac OS X, the Option key has functions similar to the AltGr key.
"""
> There is really no hard-and-fast rule to say that Meta means Command,
> unless I can find Apple keyboard with a key actually labelled "Meta".
plug in a Type 6 keyboard, and you'll see that Meta is Command. Plus:
http://en.wikipedia.org/wiki/Meta_key
"""
The key may be considered equivalent to the Macintosh's command key, which has the same location and similar function.
"""
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden