Implement decoding of mouse events in Go

This commit is contained in:
Kovid Goyal
2023-03-07 07:20:46 +05:30
parent 16c7681c7c
commit 37cebbc817
3 changed files with 126 additions and 0 deletions

View File

@@ -74,6 +74,9 @@ type Loop struct {
// Called when a key event happens
OnKeyEvent func(event *KeyEvent) error
// Called when a mouse event happens
OnMouseEvent func(event *MouseEvent) error
// Called when text is received either from a key event or directly from the terminal
// Called with an empty string when bracketed paste ends
OnText func(text string, from_key_event bool, in_bracketed_paste bool) error