terminal

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2018 License: MIT Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const (
	TermClear = "\033c"
	TermReset = "\033]R"
)

Variables

This section is empty.

Functions

func CurrentVT

func CurrentVT() (int, error)

func SwitchVT

func SwitchVT(num int) error

func SwitchVTThrough

func SwitchVTThrough(fd uintptr, num int) error

SwitchVTThrough is same as SwitchVT but allows you to specify TTY descriptor (you may use any TTY).

func TcSetAttr

func TcSetAttr(fd uintptr, termios *Termios) error

Types

type Termios

type Termios struct {
	Iflag  uint32
	Oflag  uint32
	Cflag  uint32
	Lflag  uint32
	Cc     [20]byte
	Ispeed uint32
	Ospeed uint32
}

func TcGetAttr

func TcGetAttr(fd uintptr) (*Termios, error)

func TurnOnRawIO

func TurnOnRawIO(tty *os.File) (orig Termios, err error)

TurnOnRawIO sets flags suitable for raw I/O (no echo, per-character input, etc) and returns original flags.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL