summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2024-08-21 04:55:58 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2024-08-21 04:55:58 +0000
commitc89aaa510e11e95ec3f4f72a175f9ce26d4e4228 (patch)
treea9002bea5dc672560a38233f1aebfa7f35588d4a
parent7cc28628e8b58ce4de37738a910ac716d31928ec (diff)
C-Space and Meta keys should not be translated in mode 1 extended keys.
-rw-r--r--usr.bin/tmux/input-keys.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/usr.bin/tmux/input-keys.c b/usr.bin/tmux/input-keys.c
index 7a83b165e48..348b0987bc7 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.95 2024/08/21 04:17:09 nicm Exp $ */
+/* $OpenBSD: input-keys.c,v 1.96 2024/08/21 04:55:57 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -547,17 +547,19 @@ input_key_mode1(struct bufferevent *bev, key_code key)
*/
onlykey = key & KEYC_MASK_KEY;
if ((key & (KEYC_META | KEYC_CTRL)) == KEYC_CTRL &&
- (onlykey == '/' || onlykey == '@' || onlykey == '^' ||
+ (onlykey == ' ' ||
+ onlykey == '/' ||
+ onlykey == '@' ||
+ onlykey == '^' ||
(onlykey >= '2' && onlykey <= '8') ||
(onlykey >= '@' && onlykey <= '~')))
return (input_key_vt10x(bev, key));
/*
- * A regular or shifted Unicode key + Meta. In the absence of a
- * standard to back this, we mimic what iTerm 2 does.
+ * A regular key + Meta. In the absence of a standard to back this, we
+ * mimic what iTerm 2 does.
*/
- if ((key & (KEYC_CTRL | KEYC_META)) == KEYC_META &&
- KEYC_IS_UNICODE(key))
+ if ((key & (KEYC_CTRL | KEYC_META)) == KEYC_META)
return (input_key_vt10x(bev, key));
return (-1);