diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-11-30 16:44:03 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-11-30 16:44:03 +0000 |
commit | 29a5931c6a352f12fe4bcc1cb72cb96e073ddca6 (patch) | |
tree | b7fef76523c8fc723b11e45c8cd89f18bf33568a /tty-keys.c | |
parent | 2182e1badcc161c6e6f1ef6dec21a57cc510299e (diff) | |
download | rtmux-29a5931c6a352f12fe4bcc1cb72cb96e073ddca6.tar.gz rtmux-29a5931c6a352f12fe4bcc1cb72cb96e073ddca6.tar.bz2 rtmux-29a5931c6a352f12fe4bcc1cb72cb96e073ddca6.zip |
Handle partial xterm function key sequences.
Diffstat (limited to 'tty-keys.c')
-rw-r--r-- | tty-keys.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -472,12 +472,15 @@ tty_keys_next(struct tty *tty) goto partial_key; } - /* Not found. Try to parse a key with an xterm-style modifier. */ - key = xterm_keys_find(buf, len, &size); - if (key != KEYC_NONE) { + switch (xterm_keys_find(buf, len, &size, &key)) { + case 0: /* found */ evbuffer_drain(tty->event->input, size); goto handle_key; + case -1: /* not found */ + break; + case 1: + goto partial_key; } /* Skip the escape. */ |