package
0.0.0-20240410193255-f4dd720278d7
Repository: https://github.com/govm-project/govm.git
Documentation: pkg.go.dev
# Functions
Err returns a file pointer to stderr of a new terminal.
GetState returns the state of a new terminal.
GetWinsize returns a new terminals window size.
In returns a file pointer to stdin of a new terminal.
IsTTY returns true if the new terminal is a tty.
MakeRaw creates a new terminal with raw output.
NewEscapeProxy returns a new TTY proxy reader which wraps the given reader and detects when the specified escape keys are read, in which case the Read method will return an error of type EscapeError.
NewTerminal returns a pointer to a new Terminal struct using the given in, out and err files as files for input, output and error handling.
Out returns a file pointer to stdout of a new terminal.
Restore returns a new terminal with no in or out state.
SetWinsize sets the window size of a new terminal.
StdTerminal returns a pointer to a new terminal.
ToBytes converts a string representing a suite of key-sequence to the corresponding ASCII code.
# Variables
ASCII lists the possible supported ASCII key sequence nolint: gochecknoglobals.
ErrInvalidState is returned if the state of the terminal is invalid.
ErrNoTTY defines the errormessage to return when a terminal is not a tty.
# Structs
EscapeError is special error which returned by a TTY proxy reader's Read() method in case its detach escape sequence is read.
State represents the state of the terminal.
Terminal describes a terminal it stores file pointers to the in, out and error file handers and the state of the in and output.
Winsize represents the size of the terminal window.
# Type aliases
Termios is the Unix API for terminal I/O.