func (self *Keyboard) registerNewEvents(key KeyCode, event events.Event) { eventsFromKey, eventFound := self.keyToEvent[key] if eventFound { for _, eventFromKey := range eventsFromKey { event.EventType = eventFromKey self.eventReceived(event) } } }
func (self *Mouse) registerNewEvents(button MouseButtonCode, event events.Event) { eventsFromButton, eventFound := self.buttonToEvent[button] if eventFound { for _, eventFromButton := range eventsFromButton { event.EventType = eventFromButton self.eventReceived(event) } } }