From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eugene Vlasov Newsgroups: gmane.emacs.devel Subject: Re: wish: right alt/meta to switch keyboard layout while pressed Date: Sat, 26 Nov 2005 13:15:21 +0500 Message-ID: <20051126081521.GA8681@eugene-home.ikz.ru> References: <200511222150.54248.pogonyshev@gmx.net> <200511252137.13822.pogonyshev@gmx.net> <87y83c5qg7.fsf-monnier+emacs@gnu.org> <200511260033.24103.pogonyshev@gmx.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1132993808 30031 80.91.229.2 (26 Nov 2005 08:30:08 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 26 Nov 2005 08:30:08 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 26 09:30:04 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EfvQn-0007Pa-EK for ged-emacs-devel@m.gmane.org; Sat, 26 Nov 2005 09:29:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EfvQR-0000eA-CX for ged-emacs-devel@m.gmane.org; Sat, 26 Nov 2005 03:28:52 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Efv6T-0002XR-Qf for emacs-devel@gnu.org; Sat, 26 Nov 2005 03:08:15 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Efv6O-0002X4-29 for emacs-devel@gnu.org; Sat, 26 Nov 2005 03:08:08 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Efv6N-0002X0-PJ for emacs-devel@gnu.org; Sat, 26 Nov 2005 03:08:07 -0500 Original-Received: from [84.237.112.6] (helo=mail.ikz.ru) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Efv6N-0008RS-8a for emacs-devel@gnu.org; Sat, 26 Nov 2005 03:08:07 -0500 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.ikz.ru (Postfix) with ESMTP id B993A1DC042 for ; Sat, 26 Nov 2005 12:51:30 +0500 (YEKT) Original-Received: from mail.ikz.ru ([127.0.0.1]) by localhost (laim [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 19578-07 for ; Sat, 26 Nov 2005 12:51:30 +0500 (YEKT) Original-Received: from eugene-home.ikz.ru (unknown [83.136.112.90]) by mail.ikz.ru (Postfix) with ESMTP id B0D2F1DC03A for ; Sat, 26 Nov 2005 12:51:27 +0500 (YEKT) Original-Received: by eugene-home.ikz.ru (Postfix, from userid 501) id 4F1183FCE8; Sat, 26 Nov 2005 13:15:22 +0500 (YEKT) Original-To: emacs-devel@gnu.org Mail-Followup-To: emacs-devel@gnu.org Content-Disposition: inline In-Reply-To: <200511260033.24103.pogonyshev@gmx.net> X-Virus-Scanned: by amavisd-new at ikz.ru 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:46602 Archived-At: On Sat, Nov 26, 2005 at 12:33:23AM +0200 Paul Pogonyshev wrote: > After this, most applications handle, say `=F3trl-=E3' just like `Ctrl-= W' (`=E3' and > `W' are on the same key.) However, Firefox doesn't, for some reason (w= hich pisses > me off a lot, BTW) and so doesn't Emacs... No idea why. With this patch from ALTLinux distribution keybindings with Ctrl and Meta works for me in russian keyboard map: diff -Naur emacs/src/xterm.c emacs.build/src/xterm.c --- emacs/src/xterm.c 2005-11-16 23:44:07 +0500 +++ emacs.build/src/xterm.c 2005-11-26 12:50:23 +0500 @@ -6141,11 +6141,20 @@ =20 /* make_lispy_event turns chars into control chars. Don't do it here because XLookupString is too eager. */ - event.xkey.state &=3D ~ControlMask; - event.xkey.state &=3D ~(dpyinfo->meta_mod_mask - | dpyinfo->super_mod_mask - | dpyinfo->hyper_mod_mask - | dpyinfo->alt_mod_mask); + /* make CMsHA behave the same no matter what the rest of the=20 + state is (particularly important for multilingual XKBmaps + when we still want the latin letters appear in the "control= " + sequences; would be nice if we also could choose an indepen= dent + map for each buffer like xxkb does for windows: the the pro= blem with + smth like C-h f in Russian mode would be solved); discard + all mods save shift. (imz@altlinux.ru, 2002 Nov 8, + fixing #852 at bugs.altlinux.ru) */ + if (event.xkey.state & ( ControlMask + | dpyinfo->meta_mod_mask + | dpyinfo->super_mod_mask + | dpyinfo->hyper_mod_mask + | dpyinfo->alt_mod_mask)) + event.xkey.state &=3D (ShiftMask | dpyinfo->shift_lock_mask)= ; =20 /* In case Meta is ComposeCharacter, clear its status. According to Markus Ehrnsperger --=20 WBR, Eugene Vlasov mailto:eugvv at altlinux.ru JID: eugvv@jabber.ru