From ddf6af79e38600558db711e2076b951117eba4c4 Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 2 Oct 2024 08:06:45 +0000 Subject: [PATCH] Report shifted keys like S-A as A not as S-A in mode 1 extended keys, from Stanislav Kljuhhin. --- input-keys.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/input-keys.c b/input-keys.c index e690a3a8..342a3dd8 100644 --- a/input-keys.c +++ b/input-keys.c @@ -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.