From fbafcf17bcaf81a423fe112ab6088ad5de06908c Mon Sep 17 00:00:00 2001 From: nicm Date: Wed, 16 Jun 2021 08:37:58 +0000 Subject: [PATCH] Pass Ctrl keys through as is when given as hex, GitHub issue 2724. --- usr.bin/tmux/key-string.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.bin/tmux/key-string.c b/usr.bin/tmux/key-string.c index ccf4022f7f5..fca85dadae7 100644 --- a/usr.bin/tmux/key-string.c +++ b/usr.bin/tmux/key-string.c @@ -1,4 +1,4 @@ -/* $OpenBSD: key-string.c,v 1.67 2021/06/10 07:38:28 nicm Exp $ */ +/* $OpenBSD: key-string.c,v 1.68 2021/06/16 08:37:58 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -183,6 +183,8 @@ key_string_lookup_string(const char *string) if (string[0] == '0' && string[1] == 'x') { if (sscanf(string + 2, "%x", &u) != 1) return (KEYC_UNKNOWN); + if (u < 32) + return (u); mlen = wctomb(m, u); if (mlen <= 0 || mlen > MB_LEN_MAX) return (KEYC_UNKNOWN); -- 2.20.1