Global commands: replace gestures map with script decorator#11974
Merged
michaelDCurran merged 25 commits intoJan 12, 2021
Merged
Global commands: replace gestures map with script decorator#11974michaelDCurran merged 25 commits into
michaelDCurran merged 25 commits into
Conversation
…vaccess#11964. The following commands were edited to use scriptHandler.script decorator: NVDA+N (show NVDA menu), NVDA+1 (toggle input help), NVDA+Q (quit NVDA), NVDA+F2 (pass next key through), NVDA+Shift+S/Z (toggle sleep mode), as well as unassigned restart NVDA command. For sleep mode toggle command, allow sleep mode flag is kept, and for NVDA menu and sleep mode toggle commands, gestures tuple is used (gestures order: keyboard (desktop and laptop), braille (including braille input and emulated keys), touch).
…r. Re nvaccess#11964. Convert the following scripts: NVDA+F12 (time and date), NVDA+C (clipboard data announcement), NVDA+Shift+B (battery status).
… decorator. Re nvaccess#11964. Convert the following commands: NVDA+up arrow/L (read current line), NVDA+Tab (current focus), NVDA+End/Shift+End (read status line), NVDA+down arrow/A (say all), NVDA+Shift+up arrow/Shift+S (say selection), NVDA+T (say title), NVDA+B (read foreground window).
…rator. Re nvaccess#11964. Converted object navigation scripts: NVDA+Numpad 5/4/6/8/2, NVDA+Shift+O/right/left/up/down arrows, object touch mode flicks (announce current object/move to next/previous/parent/first child) and friends.
nvaccess#11964. Convert review cursor commands: Shift+Numpad 7/9, Control+NvDA+Home/End on laptop layout (top/bottom), Numpad 7/8/9 (previous/current/next line)m Numpad 4/5/6 (previous/current/next word), Numpad 1/2/3 (previous/current/next character), Shift+Numpad 1/3 (start/end of line) and touch equivalents in text mode, along with review mark/copy commands.
…decorator. Re nvaccess#11964. Convert the following commands: left/right mouse click/lock, move navigator object to mouse and mouse to navigator object, focus/browse mode toggle, parent tree interceptor.
… decorator. Re nvaccess#11964. Convert settings dialogs/panels opener commands to use script decorator, including ones iwthout a set gesture such as dictionary dialogs and review cursor panel.
…rator. Re nvaccess#11964. Convert the following configuration management scripts: Control+NVDA+C (save configuration), Control+NVDA+R (revert/reset configuration), Control+NVDA+P (open config profiles dialog), and an unassigned command to toggle profile triggers.
…vaccess#11964. Convert various settings scripts to use script decorator, including NVDA+2 (toggle speak typed characters), NVDA+U (probress bar output) and others.
…corator. Re nvaccess#11964. Convert synth settings ring scripts: Control+NVDA+arrows/Control+NVDA+Shift+arrows (next/previous setting, increase/decrease current setting).
…script decorator. Re nvaccess#11964. Convert document formatting scripts to use script decorator, all of them unassigned.
…tor. Re nvaccess#11964. Convert unassigned settings scripts such as braille focus presentation, change braille cursor/shape, mouse text resolution, all unassigned.
…access#11964. Convert tools scripts to script decorator, including app module info, UWP OCR, speech viewer, and others, some of them with gestures unassigned.
…tor. Re 311964. Converted braille input and outpu scripts (except keyboard emulation) to use script decorator (tested with a HumanWare BrailleNote Touch Plus).
…vaccess#11964. Convert touch-specific scripts to use script decorator, including touch hover, right click, and touch mode toggle.
…orator. Re nvaccess#11964. Convert keyboard emulation scripts for Control, Alt, Windows, Shift, and NVDA keys to use script decorator.
…s of function argument definitions. Re nvaccess#11964.
…nvaccess#11964. Replace gestures map found in global commands with script decorator.
Member
|
@josephsl I notice that many of the translated descriptions have their translator comment within the gettext function brackets rather than above E.g. Are you sure that these comments are successfully included in pot files when written this way? |
Contributor
Author
|
Hi, yes, translator comments are included, and it was written that way due to Flake8 complaining about line length. Thanks.
|
michaelDCurran
approved these changes
Jan 12, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
Targetting 2021.1 and to encourage usage of script decorator throughout nVDA Core and add-ons:
Link to issue number:
Closes #11964
Summary of the issue:
NVDA 2018.3 introduced scriptHandler.script decorator to ease definition of scripts. one of the places where it is used is global commands where a mixture of script decorator and gestures map is used. To encourage usage of script decorator, standardize around it, beginning with global commands.
Description of how this pull request fixes the issue:
Replace gestures map with script decorator. One exception is sleep mode command where the script uses an attribute that isn't accepted by script decorator yet.
Testing performed:
Tested in source code form (with script decorator applied in global commands).
Known issues with pull request:
None
Change log entry:
None (not really needed)
Considerations:
If this approach is successful, I expect people will file pull requests to convert other parts of NVDA to use script decorator, which will result in more add-ons adopting script decorator approach. This change is significant enough to target 2021.1.
Thanks.