code

package
v0.1.3-0...-08ec195 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2018 License: BSD-4-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VINTR         = 1
	VQUIT         = 2
	VERASE        = 3
	VKILL         = 4
	VEOF          = 5
	VEOL          = 6
	VEOL2         = 7
	VSTART        = 8
	VSTOP         = 9
	VSUSP         = 10
	VDSUSP        = 11
	VREPRINT      = 12
	VWERASE       = 13
	VLNEXT        = 14
	VFLUSH        = 15
	VSWTCH        = 16
	VSTATUS       = 17
	VDISCARD      = 18
	IGNPAR        = 30
	PARMRK        = 31
	INPCK         = 32
	ISTRIP        = 33
	INLCR         = 34
	IGNCR         = 35
	ICRNL         = 36
	IUCLC         = 37
	IXON          = 38
	IXANY         = 39
	IXOFF         = 40
	IMAXBEL       = 41
	IUTF8         = 42
	ISIG          = 50
	ICANON        = 51
	XCASE         = 52
	ECHO          = 53
	ECHOE         = 54
	ECHOK         = 55
	ECHONL        = 56
	NOFLSH        = 57
	TOSTOP        = 58
	IEXTEN        = 59
	ECHOCTL       = 60
	ECHOKE        = 61
	PENDIN        = 62
	OPOST         = 70
	OLCUC         = 71
	ONLCR         = 72
	OCRNL         = 73
	ONOCR         = 74
	ONLRET        = 75
	CS7           = 90
	CS8           = 91
	PARENB        = 92
	PARODD        = 93
	TTY_OP_ISPEED = 128
	TTY_OP_OSPEED = 129
)

POSIX terminal mode flags as listed in RFC 4254 Section 8.

Variables

View Source
var TermAttrSetters = map[uint8]Setter{
	VINTR:    &ccSetter{Character: syscall.VINTR},
	VQUIT:    &ccSetter{Character: syscall.VQUIT},
	VERASE:   &ccSetter{Character: syscall.VERASE},
	VKILL:    &ccSetter{Character: syscall.VKILL},
	VEOF:     &ccSetter{Character: syscall.VEOF},
	VEOL:     &ccSetter{Character: syscall.VEOL},
	VEOL2:    &ccSetter{Character: syscall.VEOL2},
	VSTART:   &ccSetter{Character: syscall.VSTART},
	VSTOP:    &ccSetter{Character: syscall.VSTOP},
	VSUSP:    &ccSetter{Character: syscall.VSUSP},
	VDSUSP:   &nopSetter{},
	VREPRINT: &ccSetter{Character: syscall.VREPRINT},
	VWERASE:  &ccSetter{Character: syscall.VWERASE},
	VLNEXT:   &ccSetter{Character: syscall.VLNEXT},
	VFLUSH:   &nopSetter{},
	VSWTCH:   &nopSetter{},
	VSTATUS:  &nopSetter{},
	VDISCARD: &ccSetter{Character: syscall.VDISCARD},

	IGNPAR:  &iflagSetter{Flag: syscall.IGNPAR},
	PARMRK:  &iflagSetter{Flag: syscall.PARMRK},
	INPCK:   &iflagSetter{Flag: syscall.INPCK},
	ISTRIP:  &iflagSetter{Flag: syscall.ISTRIP},
	INLCR:   &iflagSetter{Flag: syscall.INLCR},
	IGNCR:   &iflagSetter{Flag: syscall.IGNCR},
	ICRNL:   &iflagSetter{Flag: syscall.ICRNL},
	IUCLC:   &nopSetter{},
	IXON:    &iflagSetter{Flag: syscall.IXON},
	IXANY:   &iflagSetter{Flag: syscall.IXANY},
	IXOFF:   &iflagSetter{Flag: syscall.IXOFF},
	IMAXBEL: &iflagSetter{Flag: syscall.IMAXBEL},
	IUTF8:   &iflagSetter{Flag: syscall.IUTF8},

	ISIG:    &lflagSetter{Flag: syscall.ISIG},
	ICANON:  &lflagSetter{Flag: syscall.ICANON},
	XCASE:   &nopSetter{},
	ECHO:    &lflagSetter{Flag: syscall.ECHO},
	ECHOE:   &lflagSetter{Flag: syscall.ECHOE},
	ECHOK:   &lflagSetter{Flag: syscall.ECHOK},
	ECHONL:  &lflagSetter{Flag: syscall.ECHONL},
	NOFLSH:  &lflagSetter{Flag: syscall.NOFLSH},
	TOSTOP:  &lflagSetter{Flag: syscall.TOSTOP},
	IEXTEN:  &lflagSetter{Flag: syscall.IEXTEN},
	ECHOCTL: &lflagSetter{Flag: syscall.ECHOCTL},
	ECHOKE:  &lflagSetter{Flag: syscall.ECHOKE},
	PENDIN:  &lflagSetter{Flag: syscall.PENDIN},

	OPOST:  &oflagSetter{Flag: syscall.OPOST},
	OLCUC:  &nopSetter{},
	ONLCR:  &oflagSetter{Flag: syscall.ONLCR},
	OCRNL:  &oflagSetter{Flag: syscall.OCRNL},
	ONOCR:  &oflagSetter{Flag: syscall.ONOCR},
	ONLRET: &oflagSetter{Flag: syscall.ONLRET},

	CS7:    &cflagSetter{Flag: syscall.CS7},
	CS8:    &cflagSetter{Flag: syscall.CS8},
	PARENB: &cflagSetter{Flag: syscall.PARENB},
	PARODD: &cflagSetter{Flag: syscall.PARODD},

	TTY_OP_ISPEED: &nopSetter{},
	TTY_OP_OSPEED: &nopSetter{},
}

Functions

func GetAttr

func GetAttr(tty *os.File) (*syscall.Termios, error)

func SetAttr

func SetAttr(tty *os.File, termios *syscall.Termios) error

Types

type Setter

type Setter interface {
	Set(pty *os.File, termios *syscall.Termios, value uint32) error
}

Jump to

Keyboard shortcuts

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