Documentation ¶
Index ¶
Constants ¶
View Source
const ( IGNBRK = syscall.IGNBRK PARMRK = syscall.PARMRK INLCR = syscall.INLCR IGNCR = syscall.IGNCR ECHONL = syscall.ECHONL CSIZE = syscall.CSIZE ICRNL = syscall.ICRNL ISTRIP = syscall.ISTRIP PARENB = syscall.PARENB ECHO = syscall.ECHO ICANON = syscall.ICANON ISIG = syscall.ISIG IXON = syscall.IXON BRKINT = syscall.BRKINT INPCK = syscall.INPCK OPOST = syscall.OPOST CS8 = syscall.CS8 IEXTEN = syscall.IEXTEN )
Variables ¶
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 ¶
Types ¶
type State ¶
type State struct {
// contains filtered or unexported fields
}
func MakeRaw ¶
MakeRaw put the terminal connected to the given file descriptor into raw mode and returns the previous state of the terminal so that it can be restored.
func SetRawTerminal ¶
Click to show internal directories.
Click to hide internal directories.