Documentation ¶
Index ¶
Constants ¶
View Source
const ( ESCAPE rune = 27 CSI rune = '[' ENTER rune = 10 BACKSPACE rune = 127 TAB rune = 9 KEY_UP rune = -2 KEY_DOWN rune = -3 KEY_LEFT rune = -4 KEY_RIGHT rune = -5 KEY_INSERT rune = -6 KEY_HOME rune = -7 KEY_PAGE_UP rune = -8 KEY_PAGE_DOWN rune = -9 KEY_DELETE rune = -10 KEY_END rune = -11 KEY_F1 rune = -12 KEY_F2 rune = -13 KEY_F3 rune = -14 KEY_F4 rune = -15 KEY_F5 rune = -16 KEY_F6 rune = -17 KEY_F7 rune = -18 KEY_F8 rune = -19 KEY_F9 rune = -20 KEY_F10 rune = -21 KEY_F11 rune = -22 KEY_F12 rune = -23 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
Represents an event. KeyPressed events have the Chr populated with the pressed key, while mouse events use the X and Y field to show the location (0 indexed).
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
Allows to listen for Events given by the user, like keypresses.
func (*Listener) DisableMouseTracking ¶
Ends the support for mouse events, necessary before exiting the program.
func (*Listener) EnableMouseTracking ¶
Enables the listener to listen to mouse events. Don't forget to DisableMouseTracking when finished, or the terminal will be broken afterwards.
Click to show internal directories.
Click to hide internal directories.