4 "github.com/gdamore/tcell"
9 // RawEvent is simply an escape code
10 // We allow users to directly bind escape codes
11 // to get around some of a limitations of terminals
12 type RawEvent struct {
16 // KeyEvent is a key event containing a key code,
17 // some possible modifiers (alt, ctrl, etc...) and
18 // a rune if it was simply a character press
19 // Note: to be compatible with tcell events,
20 // for ctrl keys r=code
21 type KeyEvent struct {
27 // MouseEvent is a mouse event with a mouse button and
28 // any possible key modifiers
29 type MouseEvent struct {
34 type KeyAction func(Handler) bool
35 type MouseAction func(Handler, tcell.EventMouse) bool
37 // A Handler will take a tcell event and execute it
39 type Handler interface {
40 HandleEvent(tcell.Event)