From fc2016dbb665f01e795a89632a1bb74294bfc4e1 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 9 Jul 2019 14:03:12 +0000 Subject: Add a -H flag to send-keys to send literal keys given as hex numbers (needed for control clients to send mouse sequences). Also add some format flags for UTF-8 and SGR mouse mode. Requested by Bradley Smith in GitHub issues 1832 and 1833. --- key-string.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'key-string.c') diff --git a/key-string.c b/key-string.c index 8442727d..a1ef4f51 100644 --- a/key-string.c +++ b/key-string.c @@ -284,6 +284,12 @@ key_string_lookup_key(key_code key) return (out); } + /* Literal keys are themselves. */ + if (key & KEYC_LITERAL) { + snprintf(out, sizeof out, "%c", (int)(key & 0xff)); + return (out); + } + /* * Special case: display C-@ as C-Space. Could do this below in * the (key >= 0 && key <= 32), but this way we let it be found -- cgit