Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Key ¶
type Key string
Key represents a key on a keyboard.
const ( // KeyEscape is the ESCAPE key. KeyEscape Key = "\x00\x1b" // KeyBackspace is the BACKSPACE key. KeyBackspace Key = "\x00\x7f" // KeyDelete is the DELETE key. KeyDelete Key = "\x1b[3~" // KeyEnter is the ENTER or RETURN key. KeyEnter Key = "\x00\x0d" // KeyUp is the UP ARROW key. KeyUp Key = "\x1b[A" // KeyDown is the DOWN ARROW key. KeyDown Key = "\x1b[B" // KeyRight is the RIGHT ARROW key. KeyRight Key = "\x1b[C" // KeyLeft is the LEFT ARROW key. KeyLeft Key = "\x1b[D" )
type KeyReader ¶
type KeyReader struct { Reader *RawReader // contains filtered or unexported fields }
KeyReader reads key-presses from a RawReader.
type RawReader ¶
type RawReader struct {
// contains filtered or unexported fields
}
RawReader reads from a terminal input device in "raw" mode.
func NewRawReader ¶
NewRawReader returns a reader that reads from t in "raw" mode.
func (*RawReader) Close ¶
Close closes the reader, restoring the terminal to its original mode.
It does not close the underlying input device.
Click to show internal directories.
Click to hide internal directories.