aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Culverhouse <tim@timculverhouse.com>2024-02-22 21:08:13 +0000
committerTim Culverhouse <tim@timculverhouse.com>2024-02-22 21:23:40 +0000
commit749d36d32127ba146d42d8b13aa628432bc295ea (patch)
tree33552852ebcb223554aa1ef49b531e8f16ef49b3
parentshm: use XRGB surfaces when we know we wont be using transparency (diff)
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 <robin@jarry.cc> Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
-rw-r--r--input.c4
1 files 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);
}