Alexander Prähauser <alexander.praehauser@gmx.at> writes:
The significance of the U-key is that when I press
Space-CapsLock-U
(or any other key, I think), it doesn't send the signal
that is configured by xkb but the corresponding key of the
default
English keymap (u for the U-key), which really
shouldn't happen. Anyway, here the output after pressing the
sequence
you wanted:
keycode: 48, keysym: 65027, 0
keycode: 192, keysym: 269025093, 0
keycode: 37, keysym: 65507, 0
keycode: 37, keysym: 65507, 0 <- Control_R
keycode: 48, keysym: 65027, 0 <- AC11, ISO_Level3_Shift
keycode: 192, keysym: 269025093, <- XF86Launch5
This attests to Emacs registering the keysyms you meant it to.
If
ISO_Level3_Shift is registered as a modifier key, it should not
be
translated into keyboard input afterwards, let alone the
original
apostrophe symbol.
Does this patch resolve your problems with typing level 3
characters
coupled with Control?
diff --git a/src/xterm.c b/src/xterm.c
index 6a1642ff56e..7391041ea0c 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -23734,6 +23734,7 @@ handle_one_xevent (struct x_display_info
*dpyinfo,
ptrdiff_t i;
unsigned int old_state;
struct xi_device_t *device, *source;
+ bool is_modifier_key;
coding = Qlatin_1;
@@ -24175,17 +24176,7 @@ handle_one_xevent (struct
x_display_info *dpyinfo,
/* Any "vendor-specific" key is ok. */
|| (keysym & (1 << 28))
|| (keysym != NoSymbol && nbytes == 0))
- && ! (IsModifierKey (keysym)
- /* The symbols from XK_ISO_Lock
- to XK_ISO_Last_Group_Lock
- don't have real modifiers but
- should be treated similarly to
- Mode_switch by Emacs. */
-#if defined XK_ISO_Lock && defined XK_ISO_Last_Group_Lock
- || (XK_ISO_Lock <= keysym
- && keysym <=
XK_ISO_Last_Group_Lock)
-#endif
- ))
+ && !is_modifier_key)
{
STORE_KEYSYM_FOR_DEBUG (keysym);
/* make_lispy_event will convert this to a
symbolic
@@ -24204,7 +24195,11 @@ handle_one_xevent (struct
x_display_info *dpyinfo,
STORE_KEYSYM_FOR_DEBUG (copy_bufptr[i]);
}
- if (nbytes)
+ /* Mind that NBYTES can be set even if KEYSYM
+ represents a modifier key, but that no
character
+ events should be sent in that case. */
+
+ if (nbytes && !is_modifier_key)
{
inev.ie.kind =
MULTIBYTE_CHAR_KEYSTROKE_EVENT;
inev.ie.arg = make_unibyte_string
(copy_bufptr, nbytes);