From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Pogonyshev Newsgroups: gmane.emacs.devel Subject: Re: wish: right alt/meta to switch keyboard layout while pressed Date: Sat, 26 Nov 2005 00:33:23 +0200 Message-ID: <200511260033.24103.pogonyshev@gmx.net> References: <200511222150.54248.pogonyshev@gmx.net> <200511252137.13822.pogonyshev@gmx.net> <87y83c5qg7.fsf-monnier+emacs@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1132958031 23153 80.91.229.2 (25 Nov 2005 22:33:51 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 25 Nov 2005 22:33:51 +0000 (UTC) Cc: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 25 23:33:48 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Efm6u-0005tA-7r for ged-emacs-devel@m.gmane.org; Fri, 25 Nov 2005 23:32:05 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Efm6s-0000To-Va for ged-emacs-devel@m.gmane.org; Fri, 25 Nov 2005 17:32:02 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Efm6g-0000TK-AD for emacs-devel@gnu.org; Fri, 25 Nov 2005 17:31:50 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Efm6P-0000NL-NB for emacs-devel@gnu.org; Fri, 25 Nov 2005 17:31:49 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Efm6N-0000NA-VI for emacs-devel@gnu.org; Fri, 25 Nov 2005 17:31:33 -0500 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.34) id 1Efm6N-00018k-8K for emacs-devel@gnu.org; Fri, 25 Nov 2005 17:31:31 -0500 Original-Received: (qmail invoked by alias); 25 Nov 2005 22:31:20 -0000 Original-Received: from unknown (EHLO [194.158.222.66]) [194.158.222.66] by mail.gmx.net (mp010) with SMTP; 25 Nov 2005 23:31:20 +0100 X-Authenticated: #16844820 Original-To: emacs-devel@gnu.org User-Agent: KMail/1.7.2 In-Reply-To: <87y83c5qg7.fsf-monnier+emacs@gnu.org> Content-Disposition: inline X-Y-GMX-Trusted: 0 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:46585 Archived-At: Stefan Monnier wrote: > >> > Emacs has no way of handling it correctly out-of-the-box, since it u= ses > >> > internal input methods, which are a completely separate from `xkb'. > >> You mean you use Emacs's internal input methods. I occasionally use t= hem 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 al= most > > 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': >=20 > > M-=D0=B2 is undefined >=20 > 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 l= atin layout" option turned on. This gives this command line: setxkbmap -model pc104 -layout us,ru -variant ,winkeys After this, most applications handle, say `=D0=A1trl-=D0=A6' just like `Ctr= l-W' (`=D0=A6' 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 cur= rent > > input method while pressed in Emacs. Or so that I could turn such feat= ure > > on with something as simple as `setq ... t'. >=20 > 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 Firef= ox), that is enough. Than I would be able to just use global layout switching a= nd not internal Emacs input methods. However, making it work with internal me= thods would be even better for me, since I like separate input methods for each b= uffer etc., which is impossible with global layout switching. (Well, there are s= ome horrible hacks I was privately given links to, but I'm not diving into some= thing as complicated as that.) Paul