func eventLoop(window ui.Window) bool { for e := range window.EventChan() { switch e := e.(type) { case ui.KeyEvent: if e.Key == ' ' { return true } if e.Key == 'R' { return false } continue case ui.ConfigEvent: return false case ui.MouseEvent: // TODO; zoom in on click locations continue } return false } return true }