From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: wish: right alt/meta to switch keyboard layout while pressed Date: Fri, 25 Nov 2005 17:17:41 -0500 Message-ID: <87y83c5qg7.fsf-monnier+emacs@gnu.org> References: <200511222150.54248.pogonyshev@gmx.net> <200511242145.11221.pogonyshev@gmx.net> <87iruhahvv.fsf-monnier+emacs@gnu.org> <200511252137.13822.pogonyshev@gmx.net> 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 1132958491 24341 80.91.229.2 (25 Nov 2005 22:41:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 25 Nov 2005 22:41:31 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 25 23:41:19 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EfmER-0001Ti-Tx for ged-emacs-devel@m.gmane.org; Fri, 25 Nov 2005 23:39:53 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EfmEQ-00023N-1o for ged-emacs-devel@m.gmane.org; Fri, 25 Nov 2005 17:39:50 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EfmEB-00023B-Fv for emacs-devel@gnu.org; Fri, 25 Nov 2005 17:39:35 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EfmE5-000227-8g for emacs-devel@gnu.org; Fri, 25 Nov 2005 17:39:35 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EfmE5-000221-2X for emacs-devel@gnu.org; Fri, 25 Nov 2005 17:39:29 -0500 Original-Received: from [209.226.175.24] (helo=toq4-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EfmE4-0003Ef-CQ for emacs-devel@gnu.org; Fri, 25 Nov 2005 17:39:29 -0500 Original-Received: from alfajor ([67.71.33.38]) by tomts20-srv.bellnexxia.net (InterMail vM.5.01.06.10 201-253-122-130-110-20040306) with ESMTP id <20051125221741.YPSA26550.tomts20-srv.bellnexxia.net@alfajor>; Fri, 25 Nov 2005 17:17:41 -0500 Original-Received: by alfajor (Postfix, from userid 1000) id 8AF8ED73E6; Fri, 25 Nov 2005 17:17:41 -0500 (EST) Original-To: Paul Pogonyshev In-Reply-To: <200511252137.13822.pogonyshev@gmx.net> (Paul Pogonyshev's message of "Fri, 25 Nov 2005 21:37:13 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-Originating-IP: [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:46586 Archived-At: >> > 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 the= m as >> well, but I mostly use XIM input methods and they work just fine with Em= acs. > You could put it that way, yes. However, with Russian layout, it is almo= st > impossible to do otherwise. If I switch my `global' layout (handled by K= DE, > which AFAIK falls back to `xkb'), I get this on response to `M-d': > M-=D0=B2 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-comm= and' > 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 genera= tes? >> > 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 special. > So yes, let me rephrase. I wish `Mode_switch' would deactivate the curre= nt > 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). Stefan