[Top][All Lists]

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

Re: wish: right alt/meta to switch keyboard layout while pressed

From: Stefan Monnier
Subject: Re: wish: right alt/meta to switch keyboard layout while pressed
Date: Fri, 25 Nov 2005 17:17:41 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

>> > Emacs has no way of handling it correctly out-of-the-box, since it uses
>> > internal input methods, which are a completely separate from `xkb'.
>> You mean you use Emacs's internal input methods.  I occasionally use them as
>> well, but I mostly use XIM input methods and they work just fine with Emacs.
> You could put it that way, yes.  However, with Russian layout, it is almost
> impossible to do otherwise.  If I switch my `global' layout (handled by KDE,
> which AFAIK falls back to `xkb'), I get this on response to `M-d':

>   M-в is undefined

Interesting.  I guess that could be considered as a bug.
How do other X apps handle this problem?

> Working with Emacs with essentially all commands except `self-insert-command'
> disabled is not something I like.  I guess your second layout also works with
> Latin alphabet, so it's not a problem for you.

It's not a second layout: the XIM method just provides some key-combos to
enter accented chars.  So, yes, I don't see any of those problems.

>> >> Can you check with `xev' to see what events your right Alt key generates?
>> > It shows up as `Super_R', while the left Alt is `Alt_L'.
>> So maybe the physical key is located on the right side of the space bar and
>> it has a little bit of text on it that says "alt", so *you* think of it as
>> a "right alt key".
>> But as far as X clients are concerned this is not a "right alt key".

> Uh, I just checked again, it is actually `Mode_switch' for X, I must have
> pressed the right key with the Windows logo the previous time.

That makes more sense.  xterm.c recognizes the Mode_switch key as something

> So yes, let me rephrase.  I wish `Mode_switch' would deactivate the current
> input method while pressed in Emacs.  Or so that I could turn such feature
> on with something as simple as `setq ... t'.

Is that what the Mode_switch key does in other X apps?  I.e. what does the
Mode_switch key do, "normally"?
The question is mostly to figure out whether it's a bug in our X event
handling or whether you're asking for an Emacs-only feature (the
implementation would most likely be different).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]