func hasState(evk gdki.EventKey, s gdki.ModifierType) bool { return evk.State()&uint(s) != 0 }
func hasEnter(evk gdki.EventKey) bool { return evk.KeyVal() == gdki.KEY_Return || evk.KeyVal() == gdki.KEY_KP_Enter }