From 6668a7608cac6f09d4adc3282fce9a7c03e56792 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Tue, 4 Jan 2022 11:16:46 +0800 Subject: [PATCH] Add effective group to xkey events when handling XI key press events * src/xterm.c (handle_one_xevent): Add effective group to xkey.state when translating XI key events. --- src/xterm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/xterm.c b/src/xterm.c index 31e39280b36..8202e8fb003 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -10668,7 +10668,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, xkey.root = xev->root; xkey.subwindow = xev->child; xkey.time = xev->time; - xkey.state = xev->mods.effective; + xkey.state = ((xev->mods.effective & ~(1 << 13 | 1 << 14)) + | (xev->group.effective << 13)); xkey.keycode = xev->detail; xkey.same_screen = True; -- 2.39.2