Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't suppress combinations that map to an analog axis #1054

Merged
merged 9 commits into from
Feb 4, 2025

Conversation

sezanzeb
Copy link
Owner

@sezanzeb sezanzeb commented Feb 2, 2025

Fixes #1046

  1. BTN_EXTRA + X -> ABS_X
  2. BTN_EXTRA + Y -> ABS_Y

_create_hierarchy_handlers has one key in handlers: BTN_EXTRA.

The analog input is omitted because of the rank_by method of the CombinationHandler.

This maps to a set containing the two combinations above. No HierarchyHandler is created, and both
combinations can be activated simultaneously.

  1. BTN_EXTRA + BTN_LEFT -> a

As soon as this combination is added, the _create_hierarchy_handlers has two keys in handlers.

This causes len(combinations_with_event) to be > 1, and therefore creates a HierarchyHandler.

The HierarchyHandler suppresses combination 2.

I adjusted the HierarchyHandler to not suppress combinations 1 and 2.

@sezanzeb sezanzeb marked this pull request as ready for review February 2, 2025 19:31
@sezanzeb sezanzeb merged commit 7527f35 into main Feb 4, 2025
6 checks passed
@shawarden
Copy link
Contributor

After updating the issue no longer occurs. I can bind combos to 2 axis and additional buttons without errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to bind BTN_SIDE + combos if BTN_SIDE + X/Y Axis is bound.
2 participants