Re: Meta key not working
Re: Meta key not working
- Subject: Re: Meta key not working
- From: Yang Zhang <email@hidden>
- Date: Fri, 13 Dec 2013 09:45:48 -0800
On Fri, Dec 13, 2013 at 12:58 AM, Jeremy Huddleston Sequoia
<email@hidden> wrote:
>
> On Dec 13, 2013, at 24:42, Yang Zhang <email@hidden> wrote:
>
>>>> $ xmodmap
>>>> xmodmap: up to 4 keys per modifier, (keycodes in parentheses):
>>>>
>>>> shift Shift_L (0x40), Shift_R (0x44)
>>>> lock Caps_Lock (0x41)
>>>> control Control_L (0x43), Control_R (0x46)
>>>> mod1 Meta_L (0x3f), Meta_L (0x42), Meta_R (0x45), Meta_R (0x47)
>>>> mod2
>>>> mod3
>>>> mod4
>>>> mod5
>>>
>>> What makes you think that it's not behaving as meta? The output above suggests otherwise. Run 'xev' and press the keys in the window, and you'll see they're meta, eg:
>>
>> Hmm...not sure how else to describe it. I mean, Meta-b is just
>> outputting a display character. It's not behaving as any Meta that
>> I've seen when directly using X on Linux/Unix/BSD.'
>
> X11 clients are just told what keys are pressed. What they do about it is up to them.
>
>> I mentioned one example of desired functionality: Meta-b should behave
>> as Esc-then-b in xterm (backward one word).
>
> That's configurable. You're probably used to a specific inputrc file provided by a certain distribution. Create ~/.inputrc to your liking.
I guess the thing to note is that in Terminal (where I have "use
option as meta key" enabled), things behave exactly as I expect. I'm
also seeing the undesired behavior when running xterm from a Linux
host over ssh X tunneling (xterm works fine when sitting directly at
the Linux box). In short, things appear to only diverge when running
under XQuartz.
Nonetheless, when I create an .inputrc:
M-b: backward-char
M-f: forward-char
A few quick observations:
- Nothing is affected in Terminal—alt-b/f still behave as backward-/forward-word
- xterm *does* get affected: cmd-b/f still insert strange characters,
but alt-b moves back a character and then inserts two @. alt-f still
inserts strange characters.
>
>> Another example: many
>> Emacs commands rely on the Meta key, such as Meta-x. The particular
>> problem I'm interested in: getting shortcut keys to work in PyCharm,
>> so things like menus and shortcuts work.
>
> Again, it is working here. Meta is being delivered. I just tested emacs, and it works fine using command.
>
> Test with xev, and you'll see meta is being delivered. If it's not doing what you want, that's an issue with the client receiving the event, not with XQuartz.
That's very frustrating to hear, as I don't know what else to do/try,
after expending considerable time on this—yes, xev reports 66 for alt
and 63 for meta, but alt-b and cmd-b just insert displayed characters
for me in Emacs and Pycharm (which, again, work fine when I'm directly
using the Linux host), so I'm just as lost as when I started.
I can record a video of what I'm seeing if you think that would help....
>
>>> KeyRelease event, serial 34, synthetic NO, window 0x600001,
>>> root 0x171, subw 0x0, time 3941225288, (146,-8), root:(332,14),
>>> state 0x8, keycode 63 (keysym 0xffe7, Meta_L), same_screen YES,
>>> XLookupString gives 0 bytes:
>>> XFilterEvent returns: False
>>>
>>> --Jeremy
>>>
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
X11-users mailing list (email@hidden)
This email sent to email@hidden