func (k *Keys) OnKeyDown(key int) {
	k.Pressed[key] = true
}
OnKeyDown Attached to OnKeyDown event
package main
const (
	keyUp   = 38
	keyDown = 40
)
type Keys struct {
	Pressed map[int]bool
}
func NewKeys() Keys {
	keys := Keys{}
	keys.Pressed = make(map[int]bool)
	return keys
}
func (k *Keys) IsDown(key int) bool {
	stat, exists := k.Pressed[key]
	return exists && stat
}