Game dev
Saved & recent

Input event propagation

Related terms: event consumption, handled input, input mapping, UI focus

The route an input event takes through possible handlers. An interface can consume an event after using it, preventing later handlers from responding to that same event. Clicking a menu button should not also fire the weapon behind the menu.

Input mapping assigns meaning to a key or button; propagation decides which system gets to react. Give interface handlers a chance to consume relevant events before gameplay handles the remainder. Consuming an event does not necessarily change the device’s held-button state, so gameplay that polls input directly also needs appropriate menu or gameplay-state checks.

Further reading
Godot: input event flow
menu button interface handler gameplay handler event consumed menu button interface handler gameplay handler event forwarded
The interface consumes a click on its menu button. A click outside the button can reach gameplay.

View in the full Game dev collection