brodie/mouseterm — pull request #14 by saitoha (2013-11-18 15:44:54+00:00)
Title: Reset mouse mode and app cursor mode when RIS (hard reset) is detected

I think mouseterm should accept RIS (hard reset) sequence.
This is expected to reset the terminal to "power-on state".
So when terminal detect it, all states of the terminal should be initialized.

Actually, "reset" command (it emits RIS) doesn't work well with mouseterm.
You can test this behavior by the following method:

$ echo -e "\033[?1h\033[?1002h"
$ reset
$ cat
<... send mouse and cursor key event. >

This patch will fix that problem.

reference: http://www.vt100.net/docs/vt510-rm/RIS