diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-10-26 17:46:33 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-10-26 17:46:33 +0000 |
commit | fd2ef18a7004fb35dbe40b99765609189827a6f8 (patch) | |
tree | 4ba4edcda169febe60a64950f764f8fbfd1596f5 /tty-keys.c | |
parent | c92c2bfb10d9c94acf0d453d9b4e71d6d696e8af (diff) | |
download | rtmux-fd2ef18a7004fb35dbe40b99765609189827a6f8.tar.gz rtmux-fd2ef18a7004fb35dbe40b99765609189827a6f8.tar.bz2 rtmux-fd2ef18a7004fb35dbe40b99765609189827a6f8.zip |
Rewrite xterm-keys code (both input and output) so that works (doesn't always
output the same modifiers, accepts all the possible input keys) and is more
understandable.
Diffstat (limited to 'tty-keys.c')
-rw-r--r-- | tty-keys.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -341,6 +341,13 @@ tty_keys_next(struct tty *tty, int *key, struct mouse_event *mouse) goto found; } + /* Not found. Try to parse a key with an xterm-style modifier. */ + *key = xterm_keys_find(buf, len, &size); + if (*key != KEYC_NONE) { + buffer_remove(tty->in, size); + goto found; + } + /* Escape but no key string. If the timer isn't started, start it. */ if (!(tty->flags & TTY_ESCAPE)) { tv.tv_sec = 0; |