[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: Paul Pogonyshev
Subject: Re: wish: right alt/meta to switch keyboard layout while pressed
Date: Sat, 26 Nov 2005 18:46:24 +0200
User-agent: KMail/1.7.2

Stefan Monnier wrote:
> >> 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.
> When you say "most applications" does that only include KDE (Qt) apps,
> or does it also include apps that use completely different toolkits?
> I guess it also includes other apps, right?
> If so, I think this behavior of Emacs should be considered as a bug.

Not only KDE applications, no.  For instance, it works in Gaim (pure GTK+,
AFAIK) and Galeon (GNOME.)

> >> > 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'.
> Then Emacs should do the same.  I suspect it's the same bug.

Yes, if not for internal input methods, it at least must honor my global 
for `xkb' behavior.

> > 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.)
> Yes, that makes sense as well.
> So you'd want hitting Mode_switch to toggle the LEIM input method or would
> you want pressing to turn it off and releasing to turn it back on?

It seems in `xkb' Mode_switch disables alternative groups only, i.e. it won't
start typing in Russian if I hold Mode_switch while using the English layout.
So, if you manage to implement something similar in Emacs, it should probably
behave like this (i.e. deactivate any non-default input method) for consistency.


reply via email to

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