func (k *keyEvent) update(window *draw.Window) { for i, name := range k.keyNames { if window.WasKeyPressed(name) { k.last = i } } }