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

HID Braille Driver: add more mappings for arrow keys #14713

Merged
merged 3 commits into from Mar 23, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 24 additions & 7 deletions source/brailleDisplayDrivers/hidBrailleStandard.py
Expand Up @@ -220,22 +220,39 @@ def display(self, cells: List[int]):
"br(hidBrailleStandard):panRight",
"br(hidBrailleStandard):rockerDown",
),
"braille_previousLine": ("br(hidBrailleStandard):space+dot1",),
Copy link
Member

Choose a reason for hiding this comment

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

should we still have commands from previous and next line?

Copy link
Member Author

Choose a reason for hiding this comment

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

braille_nextLine and kb_downArrow generally do the same thing, at least by default. If however you tether braille to the review cursor, then braille_nextLine will move the review cursor up and down by line, but I think this is a fairly rare usecase, and certainly none of the braille manufacturers I'm talking with seem to care. In future we could consider some kind of toggle command on the braille display to switch between panning and moving by line or something. But it seems the expectation is that joystick / dpad acts like pressing the arrow keys on the keyboard.

"braille_nextLine": ("br(hidBrailleStandard):space+dot4",),
"braille_routeTo": ("br(hidBrailleStandard):routerSet1_routerKey",),
"braille_toggleTether": ("br(hidBrailleStandard):up+down",),
"kb:upArrow": ("br(hidBrailleStandard):joystickUp",),
"kb:downArrow": ("br(hidBrailleStandard):joystickDown",),
"kb:leftArrow": ("br(hidBrailleStandard):space+dot3", "br(hidBrailleStandard):joystickLeft"),
"kb:rightArrow": ("br(hidBrailleStandard):space+dot6", "br(hidBrailleStandard):joystickRight"),
"kb:upArrow": (
"br(hidBrailleStandard):joystickUp",
"br(hidBrailleStandard):dpadUp",
"br(hidBrailleStandard):space+dot1",
),
"kb:downArrow": (
"br(hidBrailleStandard):joystickDown",
"br(hidBrailleStandard):dpadDown",
"br(hidBrailleStandard):space+dot4",
),
"kb:leftArrow": (
"br(hidBrailleStandard):space+dot3",
"br(hidBrailleStandard):joystickLeft",
"br(hidBrailleStandard):dpadLeft",
),
"kb:rightArrow": (
"br(hidBrailleStandard):space+dot6",
"br(hidBrailleStandard):joystickRight",
"br(hidBrailleStandard):dpadRight",
),
"showGui": (
"br(hidBrailleStandard):space+dot1+dot3+dot4+dot5",
),
"kb:shift+tab": ("br(hidBrailleStandard):space+dot1+dot3",),
"kb:tab": ("br(hidBrailleStandard):space+dot4+dot6",),
"kb:alt": ("br(hidBrailleStandard):space+dot1+dot3+dot4",),
"kb:escape": ("br(hidBrailleStandard):space+dot1+dot5",),
"kb:enter": ("br(hidBrailleStandard):joystickCenter"),
"kb:enter": (
"br(hidBrailleStandard):joystickCenter",
"br(hidBrailleStandard):dpadCenter",
Copy link
Member

Choose a reason for hiding this comment

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

should dot8 be in this list?

Copy link
Member Author

Choose a reason for hiding this comment

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

"bk:dot8" (enter) and "bk:dot7" (backspace) are mapped to scripts in globalCommands.py already as they apply to all braille displays, so don't need to be explicitly mentioned in any braille driver.

),
"kb:windows+d": (
"br(hidBrailleStandard):Space+dot1+dot4+dot5",
),
Expand Down
12 changes: 5 additions & 7 deletions user_docs/en/userGuide.t2t
Expand Up @@ -3679,19 +3679,17 @@ Following are the current key assignments for these displays.
|| Name | Key |
| Scroll braille display back | pan left or rocker up |
| Scroll braille display forward | pan right or rocker down |
| Move braille display to previous line | space + dot1 |
| Move braille display to next line | space + dot4 |
| Route to braille cell | routing set 1|
| Toggle braille tethered to | up+down |
| upArrow key | joystick up |
| downArrow key | joystick down |
| leftArrow key | space+dot3 or joystick left |
| rightArrow key | space+dot6 or joystick right |
| upArrow key | joystick up, dpad up or space+dot1 |
| downArrow key | joystick down, dpad down or space+dot4 |
| leftArrow key | space+dot3, joystick left or dpad left |
| rightArrow key | space+dot6, joystick right or dpad right |
| shift+tab key | space+dot1+dot3 |
| tab key | space+dot4+dot6 |
| alt key | space+dot1+dot3+dot4 (space+m) |
| escape key | space+dot1+dot5 (space+e) |
| enter key | dot8 or joystick center |
| enter key | dot8, joystick center or dpad center |
| windows key | space+dot3+dot4 |
| alt+tab key | space+dot2+dot3+dot4+dot5 (space+t) |
| NVDA Menu | space+dot1+dot3+dot4+dot5 (space+n) |
Expand Down