Skip to content

Prefer the longest key combination for events #36

Description

@quasilyte

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions