What
Ability to stop key or mouse press/release event propagation after it was handled, e.g. trigger once and stop propagation
Why
When using multiple layers or scenes that are reacting to same key or mouse press there is no simple way to ignore previous input (trigger once works only on that particular event)
Supporting evidence
Use cases are better described by other frameworks having this like Web APIs (event.stopPropagation()), Godot (handled=true) and QML (event.accepted=true).
There is quite some examples across the forum of the same question and solutions of using visibility checks, extra variables and/or timers (e.g. here) but that is definitely cumbersome.
Simple example to reproduce it with keys:
In Base scene
In Pause scene
As both scenes react to key this will show “Pause” scene and then quickly hide it.
I made a quick workaround to simulate stop propagation
This is obviously a hack and ideally there would be an accepted or handled property for a key or mouse event which could be set when wanted and checked later when needed.
Let me know your opinions and if I’m missing something,
Best regards