mirror of
https://github.com/vsariola/sointu.git
synced 2025-06-04 01:28:45 -04:00
18 lines
286 B
Go
18 lines
286 B
Go
package tracker
|
|
|
|
import (
|
|
"gioui.org/io/key"
|
|
"os"
|
|
)
|
|
|
|
// KeyEvent handles incoming key events and returns true if repaint is needed.
|
|
func (t *Tracker) KeyEvent(e key.Event) bool {
|
|
if e.State == key.Press {
|
|
switch e.Name {
|
|
case key.NameEscape:
|
|
os.Exit(0)
|
|
}
|
|
}
|
|
return false
|
|
}
|