Skip to content

Fix regression introduced by #11478#11597

Merged
michaelDCurran merged 1 commit into
betafrom
fix_11478
Sep 13, 2020
Merged

Fix regression introduced by #11478#11597
michaelDCurran merged 1 commit into
betafrom
fix_11478

Conversation

@michaelDCurran

@michaelDCurran michaelDCurran commented Sep 12, 2020

Copy link
Copy Markdown
Member

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

  • added a time.sleep of 0.5 seconds to script_review_nextLine and bound that script to alt+rightArrow. Witout this fix, releasing the alt key before the script finishes causes the menu bar to activate. With the changes in this pr the menu bar is no longer activated when pressing alt+rightArrow.
  • Provided a try build on the issue, and the reporter confirmed the issue is fixed.

Testing for issue #9463

  • Switched to an input language with multiple keyboards installed. Then selected text on google.com in Mozilla Firefox using control+shift+downArrow. Confirmed that NVDA announced the text selection in browse mode, and that the input language did not change (due to control+shift) being pressed.
  • Followed the steps in issue NVDA exits automatically in MS Word when working with this document #9463
  • Provided a try build on the issue, and a user confirmed that the issue is still fixed.

Known issues with pull request:

None

Change log entry:

None required.

…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.
@michaelDCurran michaelDCurran changed the base branch from master to beta September 12, 2020 04:02

@LeonarddeR LeonarddeR left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@michaelDCurran michaelDCurran merged commit 9cac34b into beta Sep 13, 2020
@michaelDCurran michaelDCurran deleted the fix_11478 branch September 13, 2020 05:05
@nvaccessAuto nvaccessAuto added this to the 2020.4 milestone Sep 13, 2020
@michaelDCurran michaelDCurran modified the milestones: 2020.4, 2020.3 Sep 13, 2020
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.
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.

Unwanted Alt gesture is being sent to applications, which typically triggers main menu, in certain situations, when NVDA gesture contains Alt modifier.

3 participants