diff options
author | nicm <nicm> | 2019-07-09 14:03:12 +0000 |
---|---|---|
committer | nicm <nicm> | 2019-07-09 14:03:12 +0000 |
commit | fc2016dbb665f01e795a89632a1bb74294bfc4e1 (patch) | |
tree | 452c47afaec3fde07753bc65df05c35da9a23aae /input-keys.c | |
parent | ad11d49d640c911b42c5292b5f5b7dbdffb4908b (diff) | |
download | rtmux-fc2016dbb665f01e795a89632a1bb74294bfc4e1.tar.gz rtmux-fc2016dbb665f01e795a89632a1bb74294bfc4e1.tar.bz2 rtmux-fc2016dbb665f01e795a89632a1bb74294bfc4e1.zip |
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.
Diffstat (limited to 'input-keys.c')
-rw-r--r-- | input-keys.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/input-keys.c b/input-keys.c index 39401a38..6e521ae1 100644 --- a/input-keys.c +++ b/input-keys.c @@ -173,6 +173,13 @@ input_key(struct window_pane *wp, key_code key, struct mouse_event *m) return; } + /* Literal keys go as themselves (can't be more than eight bits). */ + if (key & KEYC_LITERAL) { + ud.data[0] = (u_char)key; + bufferevent_write(wp->event, &ud.data[0], 1); + return; + } + /* * If this is a normal 7-bit key, just send it, with a leading escape * if necessary. If it is a UTF-8 key, split it and send it. |