Prefer the longest key combination for events
quasilyte opened this issue · 1 comments
Let's imagine a situation where the user is pressing the ctrl+left mouse button.
The keymap may have these actions:
ctrl+lmb
= ping (ActionPing
)lmb
= move to the spot (ActionMove
)
If we check for ActionMove
while pressing ctrl+lmb
, it would still match, as lmb is indeed being pressed. This could lead to a double action activation (ActionMove
and ActionPing
). This might not be the expected behavior.
We could try to resolve these conflicts in favor of the longest match, which would be ActionPing
in this case.
This resolution is not implemented yet.
Or we can just document this behavior and make it a user's problem to solve.
This conflict resolution, even if implemented in the future, should be optional.
It should be configured via the SystemConfig
upon system creation (default=false).
This would prevent the backward-incompatible behavior as well as give the user some freedom in the way they want the input events to be handled.
TODO: check what Godot does in this situation.