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.
This commit is contained in:
Nicholas Marriott
2013-02-17 22:56:12 +00:00
parent 4c91c153cb
commit 8df3ec612a
3 changed files with 38 additions and 6 deletions

5
tty.c
View File

@ -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);