Documentation
¶
Index ¶
- func PositionToEscapeCode(pos view.Position) string
- type ByteKey
- type Event
- type EventType
- type InputParser
- type InputReader
- type Key
- type KeyType
- type KeyboardEvent
- type Modifiers
- type MouseButton
- type MouseEvent
- type ResizeEvent
- type SpecialKey
- type TTY
- func (t *TTY) Clear()
- func (t *TTY) Close() error
- func (t *TTY) DisableCursor()
- func (t *TTY) SetPos(x, y int)
- func (t *TTY) Start(ctx context.Context, ch chan Event) error
- func (t *TTY) Wait()
- func (t *TTY) Watch(ctx context.Context, echan chan Event) error
- func (t *TTY) WindowSize() (int, int, error)
- func (t *TTY) Write(b []byte) (int, error)
- func (t *TTY) WritePos(x, y int, b []byte) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PositionToEscapeCode ¶
Types ¶
type InputParser ¶
type InputReader ¶
type InputReader interface {
io.ReadWriteCloser
Fd() uintptr
}
type KeyboardEvent ¶
func (KeyboardEvent) SetModifiers ¶
func (e KeyboardEvent) SetModifiers(modifiers Modifiers) KeyboardEvent
func (KeyboardEvent) Type ¶
func (e KeyboardEvent) Type() EventType
type MouseButton ¶
type MouseButton int
const ( MouseButton_None MouseButton = iota MouseButton_Left MouseButton_Right MouseButton_Middle )
type MouseEvent ¶
type MouseEvent struct {
// X is the x coordinate of the mouse event.
X int
// Y is the y coordinate of the mouse event.
Y int
// Button is the button that was pressed.
Button MouseButton
// Modifiers is the set of modifiers that were pressed.
Modifiers Modifiers
}
func (MouseEvent) SetModifiers ¶
func (e MouseEvent) SetModifiers(modifiers Modifiers) MouseEvent
func (MouseEvent) Type ¶
func (e MouseEvent) Type() EventType
type ResizeEvent ¶
func (ResizeEvent) Type ¶
func (e ResizeEvent) Type() EventType
type SpecialKey ¶
type SpecialKey string
const ( SpecialKey_Escape SpecialKey = "\x1b" SpecialKey_Enter SpecialKey = "\r" SpecialKey_Up SpecialKey = "\x1b[A" SpecialKey_Down SpecialKey = "\x1b[B" SpecialKey_Right SpecialKey = "\x1b[C" SpecialKey_Left SpecialKey = "\x1b[D" SpecialKey_Insert SpecialKey = "\x1b[2~" SpecialKey_Delete SpecialKey = "\x1b[3~" SpecialKey_Home SpecialKey = "\x1b[1~" SpecialKey_End SpecialKey = "\x1b[4~" SpecialKey_PageUp SpecialKey = "\x1b[5~" SpecialKey_F1 SpecialKey = "\x1bOP" SpecialKey_F2 SpecialKey = "\x1bOQ" SpecialKey_F3 SpecialKey = "\x1bOR" SpecialKey_F4 SpecialKey = "\x1bOS" SpecialKey_F5 SpecialKey = "\x1b[15~" SpecialKey_F6 SpecialKey = "\x1b[17~" SpecialKey_F7 SpecialKey = "\x1b[18~" SpecialKey_F8 SpecialKey = "\x1b[19~" SpecialKey_F9 SpecialKey = "\x1b[20~" SpecialKey_F10 SpecialKey = "\x1b[21~" SpecialKey_F11 SpecialKey = "\x1b[23~" SpecialKey_F12 SpecialKey = "\x1b[24~" )
func NewSpecialKey ¶
func NewSpecialKey(key string) SpecialKey
func (SpecialKey) Is ¶
func (k SpecialKey) Is(key Key) bool
func (SpecialKey) Type ¶
func (k SpecialKey) Type() KeyType
type TTY ¶
type TTY struct {
// contains filtered or unexported fields
}
func (*TTY) DisableCursor ¶
func (t *TTY) DisableCursor()
Click to show internal directories.
Click to hide internal directories.