summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2024-10-02 08:06:46 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2024-10-02 08:06:46 +0000
commit535ab46ca11170ba84e5d236c3a4eb16c5feaedd (patch)
tree0c2ae77e7e75d022983f48a232546d5887da46fe /usr.bin
parent93425456f462f24ddcf2869b12c9805a906bde85 (diff)
Report shifted keys like S-A as A not as S-A in mode 1 extended keys,
from Stanislav Kljuhhin.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tmux/input-keys.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/tmux/input-keys.c b/usr.bin/tmux/input-keys.c
index db37bdf171a..f7756858760 100644
--- a/usr.bin/tmux/input-keys.c
+++ b/usr.bin/tmux/input-keys.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: input-keys.c,v 1.99 2024/10/01 06:15:47 nicm Exp $ */
+/* $OpenBSD: input-keys.c,v 1.100 2024/10/02 08:06:45 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -557,6 +557,10 @@ input_key_mode1(struct bufferevent *bev, key_code key)
(onlykey >= '@' && onlykey <= '~')))
return (input_key_vt10x(bev, key));
+ /* Avoid reporting A as Shift-A, which is not expected in mode 1. */
+ if ((key & KEYC_MASK_MODIFIERS) == KEYC_SHIFT)
+ return (input_key_vt10x(bev, key));
+
/*
* A regular key + Meta. In the absence of a standard to back this, we
* mimic what iTerm 2 does.