Reflect the keypad mode of the application so that numlock works.

pull/1/head
Nicholas Marriott 2009-12-02 22:13:15 +00:00
parent 459e9de81a
commit 6bbc92a6f5
1 changed files with 7 additions and 1 deletions

8
tty.c
View File

@ -180,7 +180,7 @@ tty_start_tty(struct tty *tty)
tty_putcode(tty, TTYC_SGR0);
memcpy(&tty->cell, &grid_default_cell, sizeof tty->cell);
tty_putcode(tty, TTYC_SMKX);
tty_putcode(tty, TTYC_RMKX);
tty_putcode(tty, TTYC_ENACS);
tty_putcode(tty, TTYC_CLEAR);
@ -410,6 +410,12 @@ tty_update_mode(struct tty *tty, int mode)
else
tty_puts(tty, "\033[?1000l");
}
if (changed & MODE_KKEYPAD) {
if (mode & MODE_KKEYPAD)
tty_putcode(tty, TTYC_SMKX);
else
tty_putcode(tty, TTYC_RMKX);
}
tty->mode = mode;
}