emacs-devel
[Top][All Lists]
Advanced

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

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


From: Paul Pogonyshev
Subject: Re: wish: right alt/meta to switch keyboard layout while pressed
Date: Sat, 26 Nov 2005 00:33:23 +0200
User-agent: KMail/1.7.2

Stefan Monnier wrote:
> >> > 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?

I use KDE.  There I have the Russian (winkeys) layout added with "Include latin
layout" option turned on.  This gives this command line:

        setxkbmap -model pc104 -layout us,ru -variant ,winkeys

After this, most applications handle, say `Сtrl-Ц' just like `Ctrl-W' (`Ц' and
`W' are on the same key.)  However, Firefox doesn't, for some reason (which 
pisses
me off a lot, BTW) and so doesn't Emacs...  No idea why.

> > 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"?

Yes, if you use `setxkbmap -option grp:switch'.  In KDE Control Center this
option is called ``Right Alt key switches group while pressed.''  There is a
lot of similar options, though.  Somehow, I think this one is `standard' in
some way (I vaguelly recall some old DOS drivers behaving this way), but I may
be wrong.

> 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).

Maybe if you could make it behave like most other apps do (and unlike Firefox),
that is enough.  Than I would be able to just use global layout switching and
not internal Emacs input methods.  However, making it work with internal methods
would be even better for me, since I like separate input methods for each buffer
etc., which is impossible with global layout switching.  (Well, there are some
horrible hacks I was privately given links to, but I'm not diving into something
as complicated as that.)

Paul




reply via email to

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