diff options
author | Thomas Adam <thomas@xteddy.org> | 2017-04-19 00:01:15 +0100 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2017-04-19 00:01:15 +0100 |
commit | a71c262d5f1ff2125797569d474ff21efb7ddc91 (patch) | |
tree | f7066cfd84ac5950ab0b2dc3f5de69204511fa73 /tty-keys.c | |
parent | de4f817bd61d60ac4310052d51ba437826016df0 (diff) | |
parent | f731ae4a2dc6aca565b20dffd6ddf661e585cbb5 (diff) | |
download | rtmux-a71c262d5f1ff2125797569d474ff21efb7ddc91.tar.gz rtmux-a71c262d5f1ff2125797569d474ff21efb7ddc91.tar.bz2 rtmux-a71c262d5f1ff2125797569d474ff21efb7ddc91.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'tty-keys.c')
-rw-r--r-- | tty-keys.c | 44 |
1 files changed, 0 insertions, 44 deletions
@@ -46,8 +46,6 @@ static void tty_keys_callback(int, short, void *); static int tty_keys_mouse(struct tty *, const char *, size_t, size_t *); static int tty_keys_device_attributes(struct tty *, const char *, size_t, size_t *); -static int tty_keys_iterm2_version(struct tty *, const char *, size_t, - size_t *); /* Default raw keys. */ struct tty_default_key_raw { @@ -555,17 +553,6 @@ tty_keys_next(struct tty *tty) goto partial_key; } - /* Or a response from iTerm2? */ - switch (tty_keys_iterm2_version(tty, buf, len, &size)) { - case 0: /* yes */ - key = KEYC_UNKNOWN; - goto complete_key; - case -1: /* no, or not valid */ - break; - case 1: /* partial */ - goto partial_key; - } - /* Is this a mouse key press? */ switch (tty_keys_mouse(tty, buf, len, &size)) { case 0: /* yes */ @@ -925,34 +912,3 @@ tty_keys_device_attributes(struct tty *tty, const char *buf, size_t len, types[type]); return (0); } - -/* - * Handle a version response from iTerm2. Returns 0 for success, -1 for - * failure, 1 for partial. - */ -static int -tty_keys_iterm2_version(struct tty *tty, const char *buf, size_t len, - size_t *size) -{ - struct client *c = tty->client; - u_int i; - - *size = 0; - - if (memcmp("\033[ITERM2 ", buf, (len > 9) ? 9 : len) != 0) - return (-1); - if (len < 10) - return (1); - for (i = 9; i < len; i++) { - if (buf[i] == 'n') - break; - } - if (i == len) - return (1); - *size = i + 1; - - tty_set_type(tty, TTY_ITERM2); - - log_debug("%s: this is iTerm2", c->name); - return (0); -} |