Documentation ¶
Overview ¶
Package sys contains low-level operating system primitives of the term.
Index ¶
Constants ¶
View Source
const ( K_TAB = 0x09 // TAB key K_BACK = 0x7F // BACKSPACE key K_RETURN = 0x0D // RETURN key K_ESCAPE = 0x1B // ESC key )
Key codes
View Source
const ( K_CTRL_A = iota + 0x01 K_CTRL_B K_CTRL_C K_CTRL_D K_CTRL_E K_CTRL_F K_CTRL_G K_CTRL_H K_CTRL_I K_CTRL_J K_CTRL_K K_CTRL_L K_CTRL_M K_CTRL_N K_CTRL_O K_CTRL_P K_CTRL_Q K_CTRL_R K_CTRL_S K_CTRL_T K_CTRL_U K_CTRL_V K_CTRL_W K_CTRL_X K_CTRL_Y K_CTRL_Z )
Control+letters key codes.
View Source
const ( TCSADRAIN = 0x1 TCSAFLUSH = 0x2 TCSANOW = 0x0 )
View Source
const ( VDISCARD = 0xd VEOF = 0x4 VEOL = 0xb VEOL2 = 0x10 VERASE = 0x2 VINTR = 0x0 VKILL = 0x3 VLNEXT = 0xf VMIN = 0x6 VQUIT = 0x1 VREPRINT = 0xc VSTART = 0x8 VSTOP = 0x9 VSUSP = 0xa VTIME = 0x5 VWERASE = 0xe )
View Source
const ( BRKINT = 0x2 ICRNL = 0x100 IGNBRK = 0x1 IGNCR = 0x80 IGNPAR = 0x4 IMAXBEL = 0x2000 INLCR = 0x40 INPCK = 0x10 ISTRIP = 0x20 IXANY = 0x800 IXOFF = 0x1000 IXON = 0x400 PARMRK = 0x8 )
View Source
const ( BS0 = 0x0 BS1 = 0x2000 CR0 = 0x0 CR1 = 0x200 CR2 = 0x400 CR3 = 0x600 FF0 = 0x0 FF1 = 0x8000 NL0 = 0x0 NL1 = 0x100 OCRNL = 0x8 ONLCR = 0x4 ONLRET = 0x20 ONOCR = 0x10 OPOST = 0x1 TAB0 = 0x0 TAB1 = 0x800 TAB2 = 0x1000 XTABS = 0x1800 )
View Source
const ( B0 = 0x0 B110 = 0x3 B115200 = 0x1002 B1200 = 0x9 B134 = 0x4 B150 = 0x5 B1800 = 0xa B19200 = 0xe B200 = 0x6 B230400 = 0x1003 B2400 = 0xb B300 = 0x7 B38400 = 0xf B4800 = 0xc B50 = 0x1 B57600 = 0x1001 B600 = 0x8 B75 = 0x2 B9600 = 0xd CLOCAL = 0x800 CREAD = 0x80 CRTSCTS = 0x80000000 CS5 = 0x0 CS6 = 0x10 CS7 = 0x20 CS8 = 0x30 CSIZE = 0x30 CSTOPB = 0x40 EXTA = 0xe EXTB = 0xf HUPCL = 0x400 PARENB = 0x100 PARODD = 0x200 )
View Source
const ( ECHO = 0x8 ECHOCTL = 0x200 ECHOE = 0x10 ECHOK = 0x20 ECHOKE = 0x800 ECHONL = 0x40 ECHOPRT = 0x400 EXTPROC = 0x10000 FLUSHO = 0x1000 ICANON = 0x2 IEXTEN = 0x8000 ISIG = 0x1 NOFLSH = 0x80 PENDIN = 0x4000 TOSTOP = 0x100 )
View Source
const ( TCGETS = 0x5401 TCSETS = 0x5402 TCSETSF = 0x5404 TCSETSW = 0x5403 )
View Source
const TIOCGWINSZ = 0x5413
Variables ¶
This section is empty.
Functions ¶
func GetWinsize ¶
GetWinsize gets the winsize struct with the terminal size set by the kernel.
Types ¶
type Termios ¶
Click to show internal directories.
Click to hide internal directories.