func (tty *TTY) Close() {
	t := tty.Term()
	t.Restore()
	t.Close()
}
Close will Restore and close the raw terminal
package vt100
import (
	"strconv"
	"time"
	"unicode"
	"github.com/pkg/term"
)
var (
	defaultTimeout = 2 * time.Millisecond
	lastKey        int
)
type TTY struct {
	t       *term.Term
	timeout time.Duration
}
func NewTTY() (*TTY, error) {
	t, err := term.Open("/dev/tty", term.RawMode, term.CBreakMode, term.ReadTimeout(defaultTimeout))
	if err != nil {
		return nil, err
	}
	return &TTY{t, defaultTimeout}, nil
}
func (tty *TTY) Term() *term.Term {
	return tty.t
}
func (tty *TTY) RawMode() {
	term.RawMode(tty.t)
}
func (tty *TTY) NoBlock() {
	tty.t.SetCbreak()
}
func (tty *TTY) SetTimeout(d time.Duration) {
	tty.timeout = d
	tty.t.SetReadTimeout(tty.timeout)
}
func (tty *TTY) Restore() {
	tty.t.Restore()
}