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: Eugene Vlasov
Subject: Re: wish: right alt/meta to switch keyboard layout while pressed
Date: Sat, 26 Nov 2005 13:15:21 +0500

On Sat, Nov 26, 2005 at 12:33:23AM +0200 Paul Pogonyshev wrote:

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

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 @@
 
           /* make_lispy_event turns chars into control chars.
              Don't do it here because XLookupString is too eager.  */
-          event.xkey.state &= ~ControlMask;
-          event.xkey.state &= ~(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 
+             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 independent
+             map for each buffer like xxkb does for windows: the the problem 
with
+             smth like C-h f in Russian mode would be solved); discard
+             all mods save shift. (address@hidden, 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 &= (ShiftMask | dpyinfo->shift_lock_mask);
 
           /* In case Meta is ComposeCharacter,
              clear its status.  According to Markus Ehrnsperger



-- 
WBR, Eugene Vlasov        mailto:eugvv at altlinux.ru
                          JID: address@hidden




reply via email to

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