Skip to content

Commit

Permalink
Add default keyboard mappings for flattened object nav scripts (#15065)
Browse files Browse the repository at this point in the history
Link to issue number:
Fixes #15053

Summary of the issue:
Object navigation can be difficult to grasp for some people. It is helpful to assign the flattened object nav gestures (that are now only available on touch screen)by default.

Description of user facing changes
See change log items

Description of development approach
Added gestures to scripts in globalCommands.
  • Loading branch information
LeonarddeR committed Jul 4, 2023
1 parent 5d1b0e8 commit 5c4e6e1
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
12 changes: 10 additions & 2 deletions source/globalCommands.py
Original file line number Diff line number Diff line change
Expand Up @@ -3782,7 +3782,11 @@ def script_reportLinkDestinationInWindow(self, gesture: inputCore.InputGesture)
# Translators: Input help mode message for a touchscreen gesture.
description=_("Moves to the next object in a flattened view of the object navigation hierarchy"),
category=SCRCAT_OBJECTNAVIGATION,
gesture="ts(object):flickright"
gestures=(
"ts(object):flickright",
"kb(desktop):NVDA+numpad3",
"kb(laptop):shift+NVDA+]",
),
)
def script_navigatorObject_nextInFlow(self, gesture: inputCore.InputGesture):
curObject=api.getNavigatorObject()
Expand Down Expand Up @@ -3816,7 +3820,11 @@ def script_navigatorObject_nextInFlow(self, gesture: inputCore.InputGesture):
# Translators: Input help mode message for a touchscreen gesture.
description=_("Moves to the previous object in a flattened view of the object navigation hierarchy"),
category=SCRCAT_OBJECTNAVIGATION,
gesture="ts(object):flickleft"
gestures=(
"ts(object):flickleft",
"kb(desktop):NVDA+numpad9",
"kb(laptop):shift+NVDA+[",
),
)
def script_navigatorObject_previousInFlow(self, gesture: inputCore.InputGesture):
curObject=api.getNavigatorObject()
Expand Down
4 changes: 4 additions & 0 deletions user_docs/en/changes.t2t
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ What's New in NVDA
- An unbound gesture to cycle through the available languages for Windows OCR. (#13036)
- An unbound gesture to cycle through the braille show messages modes. (#14864)
- An unbound gesture to toggle showing the selection indicator for braille. (#14948)
- Added default keyboard gesture assignments to move to the next or previous object in a flattened view of the object hierarchy. (#15053)
- Desktop: ``NVDA+numpad9`` and ``NVDA+numpad3`` to move to the previous and next objects respectively.
- Laptop: ``shift+NVDA+[`` and ``shift+NVDA+]`` to move to the previous and next objects respectively.
-
-
- Added pronunciation of Unicode symbols:
- braille symbols such as "⠐⠣⠃⠗⠇⠐⠜". (#14548)
Expand Down
13 changes: 10 additions & 3 deletions user_docs/en/userGuide.t2t
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,12 @@ Moving to a list item's containing object will take you back to the list.
You can then move past the list if you wish to access other objects.
Similarly, a toolbar contains controls, so you must move inside the toolbar to access the controls in the toolbar.

If you yet prefer to move back and forth between every single object on the system, you can use commands to move to the previous/next object in a flattened view.
For example, if you move to the next object in this flattened view and the current object contains other objects, NVDA will automatically move to the first object that contains it.
Alternatively, if the current object doesn't contain any objects, NVDA will move to the next object at the current level of the hierarchy.
If there is no such next object, NVDA will try to find the next object in the hierarchy based on containing objects until there are no more objects to move to.
The same rules apply to moving backwards in the hierarchy.

The object currently being reviewed is called the navigator object.
Once you navigate to an object, you can review its content using the [text review commands #ReviewingText] while in [Object review mode #ObjectReview].
When [Visual Highlight #VisionFocusHighlight] is enabled, the location of the current navigator object is also exposed visually.
Expand All @@ -605,8 +611,10 @@ To navigate by object, use the following commands:
|| Name | Desktop key | Laptop key | Touch | Description |
| Report current object | NVDA+numpad5 | NVDA+shift+o | none | Reports the current navigator object. Pressing twice spells the information, and pressing 3 times copies this object's name and value to the clipboard. |
| Move to containing object | NVDA+numpad8 | NVDA+shift+upArrow | flick up (object mode) | Moves to the object containing the current navigator object |
| Move to previous object | NVDA+numpad4 | NVDA+shift+leftArrow | flick left (object mode) | Moves to the object before the current navigator object |
| Move to next object | NVDA+numpad6 | NVDA+shift+rightArrow | flick right (object mode) | Moves to the object after the current navigator object |
| Move to previous object | NVDA+numpad4 | NVDA+shift+leftArrow | none | Moves to the object before the current navigator object |
| Move to previous object in flattened view | NVDA+numpad9 | NVDA+shift+[ | flick left (object mode) | Moves to the previous object in a flattened view of the object navigation hierarchy |
| Move to next object | NVDA+numpad6 | NVDA+shift+rightArrow | none | Moves to the object after the current navigator object |
| Move to next object in flattened view | NVDA+numpad3 | NVDA+shift+] | flick right (object mode) | Moves to the next object in a flattened view of the object navigation hierarchy |
| Move to first contained object | NVDA+numpad2 | NVDA+shift+downArrow | flick down (object mode) | Moves to the first object contained by the current navigator object |
| Move to focus object | NVDA+numpadMinus | NVDA+backspace | none | Moves to the object that currently has the system focus, and also places the review cursor at the position of the System caret, if it is showing |
| Activate current navigator object | NVDA+numpadEnter | NVDA+enter | double-tap | Activates the current navigator object (similar to clicking with the mouse or pressing space when it has the system focus) |
Expand Down Expand Up @@ -664,7 +672,6 @@ The layout is illustrated as follows:

++ Review Modes ++[ReviewModes]
NVDA's [text review commands #ReviewingText] can review content within the current navigator object, current document or screen, depending on the review mode selected.
Review modes are a replacement for the older Flat Review concept found in NVDA.

The following commands switch between review modes:
%kc:beginInclude
Expand Down

0 comments on commit 5c4e6e1

Please sign in to comment.