From 749d36d32127ba146d42d8b13aa628432bc295ea Mon Sep 17 00:00:00 2001 From: Tim Culverhouse Date: Thu, 22 Feb 2024 15:08:13 -0600 Subject: [PATCH] input: don't clear text selection on modifier keypresses When kitty keyboard is enabled, pressing a modifier key will clear the text selection. This makes it difficult to copy text because the selection clears as soon as the user presses "ctrl". Tested-by: Robin Jarry Signed-off-by: Tim Culverhouse --- input.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/input.c b/input.c index 54ba32a7..67cb484f 100644 --- a/input.c +++ b/input.c @@ -434,7 +434,7 @@ execute_binding(struct seat *seat, struct terminal *term, term_damage_view(term); render_refresh(term); - break; + break; } return true; @@ -1689,7 +1689,7 @@ key_press_release(struct seat *seat, struct terminal *term, uint32_t serial, if (utf8 != buf) free(utf8); - if (handled) { + if (handled && !keysym_is_modifier(sym)) { term_reset_view(term); selection_cancel(term); }