Ignore key up events if they are not for push button actions#274
Merged
emcek merged 4 commits intobugfix_for_320from Mar 4, 2024
Merged
Ignore key up events if they are not for push button actions#274emcek merged 4 commits intobugfix_for_320from
emcek merged 4 commits intobugfix_for_320from
Conversation
sleighzy
commented
Mar 3, 2024
sleighzy
commented
Mar 3, 2024
sleighzy
commented
Mar 3, 2024
sleighzy
commented
Mar 3, 2024
sleighzy
commented
Mar 3, 2024
emcek
reviewed
Mar 3, 2024
…mcek/dcspy into prevent_duplicate_button_action_events
|
emcek
approved these changes
Mar 4, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Description
The G-Key SDK and handler send a 1 for key down and 0 for key up. For "push button" actions the key up and key down work as expected when the request bytes are retrieved from the button. When using a button with something like
CUSTOMorCYCLEhowever this is sending the custom request bytes twice, once when the key is pressed down, and then again when the key is released.The changes in this PR are to ignore the key up events for keys that aren't push buttons are only sent once, i.e. when the button is pressed.
NOTE: The
test_logitech.test_keyboard_check_buttonsunit test is currently failing due to these changes. I don't know enough about this tests intent and the usage ofcalletc. to know what should be changed for this one.