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

Allow QWERTY input from Papenmeier braille displays to work again #11944

Merged
merged 5 commits into from Dec 22, 2020

Conversation

michaelDCurran
Copy link
Member

Link to issue number:

None.

Summary of the issue:

Some Papenmeier braille displays have the ability to allow QWERTY input. However, it seems an equality check that needed to be corrected with the conversion to Python 3 was missed which disabled input completely, plus some reorganisation of keyboard input support in NVDA 2020.3 caused NVDA to freeze at a random point after typing for a while with a Papenmeier braille display.

Description of how this pull request fixes the issue:

The Papenmeier braille display driver has been updated to correctly detect and allow QWERTY input, and several new gesture bindings have also been added. The update to this driver was provided to me by Papenmeier.

keyboardHandler.injectRawKeyboardInput has been simplified to just call the keybd_event win32 API directly, and let the OS handle the input from there. 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 avoids assumptions about how NVDA's input hook worked, which are no longer true since #11478 and #11597 were merged.

keyboardHandler.injectRawKeyboardInput is currently only used by the Papenmeier braille display driver, thus why it probably broke in NVDA 2020.3.

Although I could not get a good log from papenmeier showing a useful stack, my guess is that their input thread was somehow getting stuck on the 'ignoreInjected' lock in keyboardHandler as NVDA did not expect its input hook (internal_keyDownEvent) to be called directly from that thread.

Testing performed:

  • Provided a try build to Papenmeier and had them test the driver including QWERTY input for multiple hours. They reported that the freeze they used to experience was now gone and they could type accurately.

Known issues with pull request:

None

Change log entry:

Bug fixes:

  • QWERTY input on Papenmeier braille displays that support it again works and no longer causes NVDA to randomly freeze.

@michaelDCurran michaelDCurran added this to the 2020.4 milestone Dec 16, 2020
feerrenrut
feerrenrut previously approved these changes Dec 22, 2020
Copy link
Contributor

@feerrenrut feerrenrut left a comment

Choose a reason for hiding this comment

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

Looks good thanks @michaelDCurran (and Papenmeier).

@AppVeyorBot

This comment has been minimized.

@feerrenrut feerrenrut merged commit 3f1e47e into beta Dec 22, 2020
@feerrenrut feerrenrut deleted the papenmeierKeyboardInput branch December 22, 2020 04:52
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.

None yet

3 participants