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

Work around frozen keyboard input while the NVDA core is frozen #9208

Merged
merged 3 commits into from
Jan 29, 2019

Conversation

LeonarddeR
Copy link
Collaborator

Link to issue number:

Improves #6291

Summary of the issue:

When large chunks of text are written to a terminal window, NVDA tends to freeze entirely. The freeze tends to lock up the keyboard in such a way that a user needs to sign out of his session and sign in back again, in which case it is likely that work is lost.

Description of how this pull request fixes the issue:

This pr checks whether the core is attempting recovery way earlier than the current code does. The current code does the following:

  1. Input is received
  2. winInputHook executes the keyboardHandler.internal_keyDownEvent function
  3. internal_keyDownEvent checks for pass through, sticky keys, etc.
  4. It executes inputCore.manager.executeGesture
  5. inputCore.manager.executeGesture checks whether the core is attempting recovery. If it is, it raises NoInputGestureAction
  6. The finally block of internal_keyDownEvent is executed.

The code in this pull request checks the core's recovery state within the winInputHook module itself and doesn't execute keyboardHandler.internal_keyDown/UpEvent at all when the core is frozen. While it does not fix #6291, it does no longer break keyboard input entirely, allowing a user to restart NVDA by hand.

Testing performed:

Tested by @lukaszgo1

Known issues with pull request:

This approach might be a bit aggressive. We could also check the state of the watchdog in keyboardHandler, for example. However, the current code where the keyboard hook executes a massive amount of code even when the core is frozen, is certainly not something we should keep as it is.

Change log entry:

@Brian1Gaff
Copy link

Brian1Gaff commented Jan 28, 2019 via email

@LeonarddeR
Copy link
Collaborator Author

This pull request doesn't fix anything, it only makes things less bad as they are now. Your case should be at least solved in such a way that the keyboard won't be locked up.

@michaelDCurran michaelDCurran merged commit 2a20e4f into nvaccess:master Jan 29, 2019
@nvaccessAuto nvaccessAuto added this to the 2019.1 milestone Jan 29, 2019
@LeonarddeR LeonarddeR added the BabbageWork Pull requests filed on behalf of Babbage B.V. label Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BabbageWork Pull requests filed on behalf of Babbage B.V.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NVDA hangs up in terminal, when a large piece of text is loaded
4 participants