From a2476536f9d28d8f02d8477822a1425df16ac28d Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Mon, 11 May 2026 09:16:30 +0200 Subject: search/url/unicode-mode: set last-shortcut-sym When processing shortcuts, set seat->kbd.last_shortcut_sym. This ensures the corresponding release event is ignored in the main mode, if the shortcut triggered a mode exit. For example, pressing Return in search mode would exit search mode, and then immediately reset the search match, if the kitty keyboard protocol mode with release events were enabled. --- unicode-mode.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'unicode-mode.c') diff --git a/unicode-mode.c b/unicode-mode.c index 1acdc664..99a7293d 100644 --- a/unicode-mode.c +++ b/unicode-mode.c @@ -63,6 +63,7 @@ unicode_mode_input(struct seat *seat, struct terminal *term, term_to_slave(term, utf8, chars); } + seat->kbd.last_shortcut_sym = sym; unicode_mode_deactivate(term); } @@ -72,6 +73,7 @@ unicode_mode_input(struct seat *seat, struct terminal *term, sym == XKB_KEY_d || sym == XKB_KEY_g))) { + seat->kbd.last_shortcut_sym = sym; unicode_mode_deactivate(term); } -- cgit v1.3