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

[BUG] InputMapper fail to map to correct action #144

Closed
mayanksuman opened this issue Aug 9, 2021 · 1 comment
Closed

[BUG] InputMapper fail to map to correct action #144

mayanksuman opened this issue Aug 9, 2021 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@mayanksuman
Copy link
Contributor

mayanksuman commented Aug 9, 2021

Description
When two different input sequences of same length and same end KeyEvent are defined then InputMapper fails to map to correct action.

To Reproduce
Define two input sequences as shown in this figure.

Screenshot from 2021-08-09 13-37-02

These two input sequences have two keyEvents with same last KeyEvent. First one is double click on Spotlight device and other one is Next Button Press followed by Click on Spotlight device.

Now try to press these two input sequences one by one, you will not be able to get right action in both cases.

For me, I always get 'b' Key Sequence.

Expected behavior
The InputMapper should map to correct action.

mayanksuman added a commit to mayanksuman/Projecteur that referenced this issue Aug 9, 2021
In case, when two different input sequence of same length and same end
KeyEvent are defined then InputMapper fails to map to correct action.

This commit fixes the issue with InputMapper. The correct action is
decided on the basis of all keys pressed (instead of last key pressed
in earlier version of code).
mayanksuman added a commit to mayanksuman/Projecteur that referenced this issue Aug 9, 2021
In case, when two different input sequence of same length and same end
KeyEvent are defined then InputMapper fails to map to correct action.

This commit fixes the issue with InputMapper. The correct action is
decided on the basis of all keys pressed (instead of last key pressed
in earlier version of code).
@jahnf
Copy link
Owner

jahnf commented Aug 9, 2021

Thank you mayank - good find - the way it was implemented by me with a map was producing the wrong output - basically overwriting any Action that was already set. This will be fixed with #146 .

@jahnf jahnf closed this as completed in 465eefd Aug 9, 2021
jahnf added a commit that referenced this issue Aug 9, 2021
@jahnf jahnf added the bug Something isn't working label Aug 9, 2021
@jahnf jahnf added this to the v1.0 milestone Aug 9, 2021
mayanksuman pushed a commit to mayanksuman/Projecteur that referenced this issue Aug 10, 2021
mayanksuman pushed a commit to mayanksuman/Projecteur that referenced this issue Aug 10, 2021
jahnf added a commit that referenced this issue Sep 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants