Fix regression introduced by #11478#11597
Merged
Merged
Conversation
…problematic modifiers that perform an action) before, rather than after executing the script, as if the script takes too long, and the user releases these modifiers before then, the VK_NONE is too late.
feerrenrut
pushed a commit
that referenced
this pull request
Dec 22, 2020
* keyboardHandler.injectRawKeyboardInput: Previously, NVDA would send the input manually to its keyboard input hook, and then if the hook didn't handle the input, calling keybd_event. This now avoids assumptions about how NVDA's input hook worked, which are no longer true since #11478 and #11597 were merged. * Papenmeier braille driver: More gesture bindings and fix detection of keyboard input.
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.
Link to issue number:
Fixes #11587
Summary of the issue:
Pr #11478 fixed issue #9463 by moving the sending of VK_NONE (for modifiers that would normally perform an action) from the key hook into NvDA's main thread, after executing a script.
However, it caused issue #11587
Specifically: if a script is bound to a gesture that uses the alt key, and that script takes a long time to run, and the user releases the alt key before the script is finished, and therefore before the VK_NONE is sent, then the alt key will perform its normal action of activating the menu bar.
Description of how this pull request fixes the issue:
Rather than sending the VK_NONE after the script finished executing only if the gesture had not had its 'send' method called, now the VK_NONE is sent just before the script is executed (still in the main thread of course).
The tracking of how many times 'send' has been called has now also been removed as it is no longer needed.
Testing performed:
Testing for #11587
Testing for issue #9463
Known issues with pull request:
None
Change log entry:
None required.