fixes#449 Lost keyboard input after suspend on Windows 10 PowerShell
fixes#148 Make tcell usable with any io.Reader and io.Writer
This introduces a new Tty interface so that applications can supply
their own implementation. This should facilitate work for applications
that wish to provide e.g. a webasm version of the terminal, or that need
to use different kinds of file plumbing.
fixes#194 Starting multiple screen sessions (lost key event)
You can test this by using the mouse demo, which now supports pressing
CTRL-Z. This does not actually suspend the demo, but starts a subshell
which takes over. After the subshell is exited, the demo takes control
of the screen back. This can be done multiple times, and it is possible
to start multiple "nested" iterations of the demo this way.
This does sort the main problem of screen.Fini(), but really we
want to use a separate Pause() and Resume() function, because
screen.Fini() is not meant for reuse in this way.
Note that one side effect of this change is that applications which
redirect stdin and stdout and expect us to just use /dev/tty instead
are going to break -- we are now using stdin and stdout like nearly
every other screen oriented application.
Add a Beep() method to the Screen interface. On *nix systems, this
writes the bell character (0x07) to the tty. On Windows, we call the
MessageBeep syscall.
Fixes: #2
fixes#38 Broke wide characters in last update
fixes#39 Clean up logic for encodings, enhance fallback options
fixes#36 Support more mouse buttons on Windows.