diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2013-02-17 22:56:12 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2013-02-17 22:56:12 +0000 |
commit | 8df3ec612a8c496fc2c975b8241f4e95faef5715 (patch) | |
tree | 4c5d07f4a76f653b21b810cbcf87498b64ddfd0f /tty.c | |
parent | 4c91c153cb087e1256578da1e53f002edefc9958 (diff) | |
download | rtmux-8df3ec612a8c496fc2c975b8241f4e95faef5715.tar.gz rtmux-8df3ec612a8c496fc2c975b8241f4e95faef5715.tar.bz2 rtmux-8df3ec612a8c496fc2c975b8241f4e95faef5715.zip |
In terminals with XT, turn on modifyOtherKeys=1 with the escape sequence and
handle the most common set. Pass them through if xterm-keys is on.
Diffstat (limited to 'tty.c')
-rw-r--r-- | tty.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -223,7 +223,7 @@ tty_start_tty(struct tty *tty) tty_puts(tty, "\033[?1000l"); if (tty_term_has(tty->term, TTYC_XT)) - tty_puts(tty, "\033[c"); + tty_puts(tty, "\033[c\033[>4;1m"); tty->cx = UINT_MAX; tty->cy = UINT_MAX; @@ -285,6 +285,9 @@ tty_stop_tty(struct tty *tty) if (tty_term_has(tty->term, TTYC_KMOUS)) tty_raw(tty, "\033[?1000l"); + if (tty_term_has(tty->term, TTYC_XT)) + tty_puts(tty, "\033[>4m"); + tty_raw(tty, tty_term_string(tty->term, TTYC_RMCUP)); setblocking(tty->fd, 1); |