]> git.eshelyaron.com Git - emacs.git/commitdiff
Disable XkbLC_ControlFallback
authorPo Lu <luangruo@yahoo.com>
Sat, 26 Aug 2023 01:38:34 +0000 (09:38 +0800)
committerPo Lu <luangruo@yahoo.com>
Sat, 26 Aug 2023 01:38:34 +0000 (09:38 +0800)
* src/xterm.c (handle_one_xevent) <XI_KeyPress>: Fix typos within
the commentary.
(x_term_init) [HAVE_XKB]: Disable the ControlFallback library
control, lest Xlib map function keys with ControlMask set to
ASCII keysyms within inactive groups.

src/xterm.c

index 01b9e3f1c1f56746c02906a6931e20d932e19da8..d826eec24194c7a992d9cf98df217f6c1b3040d8 100644 (file)
@@ -23784,7 +23784,8 @@ handle_one_xevent (struct x_display_info *dpyinfo,
                 deriving a keysym or text to insert.
 
                 Otherwise, if the XKB extension is available, calls
-                are made to XkbLookupKeycode and XkbTranslateKeysym.
+                are made to XkbTranslateKeyCode and
+                XkbTranslateKeySym.
 
                 And if all else fails, XEV is transformed into a core
                 event and provided to XLookupString, in a manner
@@ -24081,7 +24082,7 @@ handle_one_xevent (struct x_display_info *dpyinfo,
                            goto xi_done_keysym;
 
                          /* Save the original keysym in case
-                            XkbTranslateKeysym overflows.  */
+                            XkbTranslateKeySym overflows.  */
                          sym = keysym, overflow = 0;
 
                          /* Translate this keysym and its modifier
@@ -31098,7 +31099,17 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
                       XkbNewKeyboardNotifyMask | XkbMapNotifyMask,
                       XkbNewKeyboardNotifyMask | XkbMapNotifyMask);
     }
-#endif
+
+  /* XFree86 extends XKBlib with a new Xlib control `ControlFallback',
+     which enables a search for symbols designating ASCII characters
+     within inactive groups during keycode translation when
+     ControlMask is set.  Users find this behavior gratuitous, so
+     disable it if present.  */
+
+#ifdef XkbLC_ControlFallback
+  XkbSetXlibControls (dpyinfo->display, XkbLC_ControlFallback, 0);
+#endif /* XkbLC_ControlFallback */
+#endif /* HAVE_XKB */
 
 #ifdef HAVE_XFIXES
   int xfixes_error_base;