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

stop HID Braille routing keys from being back to front #12860

Merged
merged 3 commits into from
Sep 20, 2021

Conversation

michaelDCurran
Copy link
Member

@michaelDCurran michaelDCurran commented Sep 19, 2021

Link to issue number:

Fixes routing key bug mentioned by @FelixGruetzmacher in pr #12523

Summary of the issue:

When testing with multiple HID braille displays, it has been found that NVDA's handling of routing keys seems to be reversed, and also offset by 1.
the offset by 1 issue is just an incorrect assumption by me -- NVDA's routing key routing indexes start at 0, not 1.
However, the reverse order of the keys is due to the fact that Windows apparently loads its HID input button caps arrays in reverse order. This fact is mentioned in the Microsoft Docs article at https://docs.microsoft.com/en-us/windows-hardware/drivers/hid/button-capability-arrays

Description of how this pull request fixes the issue:

In the HID braille driver:

  • Stop adding 1 to the routing index
  • Walk through the input button caps array in reverse order. This then means that the calculated relative index of a button in its collection will now be relative from the start of the collection, rather than the end which is what we want.

Testing strategy:

On an Orbit Reader 40 set to HID Braille mode: pressed various routing keys to ensure the cursor moved to the cell directly under that routing key.

Known issues with pull request:

None known.

Change log entries:

Bug fixes

  • Routing keys on Braille displays using the HID Braille protocol are no longer reversed

Code Review Checklist:

  • Pull Request description:
    • description is up to date
    • change log entries
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • API is compatible with existing add-ons.
  • Documentation:
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English

…r, as Windows provides it backwards. This fix ensures that routing keys work correctly. They were previously reversed.

Also there is no need to add 1 to the routing index, NVDA's routing key routing indexes start at 0, not 1.
@michaelDCurran michaelDCurran merged commit d80906e into master Sep 20, 2021
@michaelDCurran michaelDCurran deleted the hidBrailleRoutingKeys branch September 20, 2021 04:40
@nvaccessAuto nvaccessAuto added this to the 2021.3 milestone Sep 20, 2021
@codeofdusk
Copy link
Contributor

Should this PR have a changelog entry, since the HID driver is new to 2021.3?

@michaelDCurran
Copy link
Member Author

michaelDCurran commented Oct 21, 2021 via email

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

4 participants