Documentation ¶
Index ¶
- Variables
- func DisableEcho(fd uintptr, state *State) error
- func GetFdInfo(in interface{}) (uintptr, bool)
- func IsTerminal(fd uintptr) bool
- func RestoreTerminal(fd uintptr, state *State) error
- func SetWinsize(fd uintptr, ws *Winsize) error
- func StdStreams() (stdIn io.ReadCloser, stdOut, stdErr io.Writer)
- func ToBytes(keys string) ([]byte, error)
- func TtySplice(conn net.Conn) (int, error)
- type State
- type Termios
- type Winsize
Constants ¶
This section is empty.
Variables ¶
View Source
var ASCII = []string{
"ctrl-@",
"ctrl-a",
"ctrl-b",
"ctrl-c",
"ctrl-d",
"ctrl-e",
"ctrl-f",
"ctrl-g",
"ctrl-h",
"ctrl-i",
"ctrl-j",
"ctrl-k",
"ctrl-l",
"ctrl-m",
"ctrl-n",
"ctrl-o",
"ctrl-p",
"ctrl-q",
"ctrl-r",
"ctrl-s",
"ctrl-t",
"ctrl-u",
"ctrl-v",
"ctrl-w",
"ctrl-x",
"ctrl-y",
"ctrl-z",
"ctrl-[",
"ctrl-\\",
"ctrl-]",
"ctrl-^",
"ctrl-_",
}
ASCII list the possible supported ASCII key sequence
View Source
var (
ErrInvalidState = errors.New("Invalid terminal state")
)
Functions ¶
func DisableEcho ¶
func IsTerminal ¶
IsTerminal returns true if the given file descriptor is a terminal.
func RestoreTerminal ¶
Restore restores the terminal connected to the given file descriptor to a previous state.
func SetWinsize ¶
func StdStreams ¶
func StdStreams() (stdIn io.ReadCloser, stdOut, stdErr io.Writer)
Types ¶
Click to show internal directories.
Click to hide internal directories.