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.
This commit is contained in:
nicm
2019-07-09 14:03:12 +00:00
parent ad11d49d64
commit fc2016dbb6
7 changed files with 94 additions and 40 deletions

View File

@ -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