mirror of
https://github.com/peco/peco.git
synced 2026-09-10 07:16:29 -04:00
26 lines
551 B
Go
26 lines
551 B
Go
package peco
|
|
|
|
import "github.com/peco/peco/internal/keyseq"
|
|
|
|
// EventType classifies the type of terminal event.
|
|
type EventType uint8
|
|
|
|
const (
|
|
// EventKey is a keyboard event
|
|
EventKey EventType = iota
|
|
// EventResize is a terminal resize event
|
|
EventResize
|
|
// EventError is an error event
|
|
EventError
|
|
)
|
|
|
|
// Event is peco's internal event type, replacing termbox.Event.
|
|
// This decouples all code outside the screen adapter from the
|
|
// terminal library.
|
|
type Event struct {
|
|
Type EventType
|
|
Key keyseq.KeyType
|
|
Ch rune
|
|
Mod keyseq.ModifierKey
|
|
}
|