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

Global commands (2021.1): replace gestures map with script decorator #11964

Closed
josephsl opened this issue Dec 22, 2020 · 0 comments · Fixed by #11974
Closed

Global commands (2021.1): replace gestures map with script decorator #11964

josephsl opened this issue Dec 22, 2020 · 0 comments · Fixed by #11974
Milestone

Comments

@josephsl
Copy link
Collaborator

Hi,

Targeting 2021.1:

Background:

In NVDA 2018.3, script decorator (scriptHandler.script) was introduced to specify script information such as gesture and description in one go. Prior to this, a gestures map was used to record what command is assigned to scripts.

Is your feature request related to a problem? Please describe.

One of the most cited places that demonstrate mixture of gestures map and script decorator is global commands. Whereas older scripts use gestures map, newer scripts use script decorator, introducing inconsistency for people reading the source code for the first time.

Describe the solution you'd like

Replace gestures map with script decorator in global commands. As this is a backward breaking change, it will target 2021.1.

Describe alternatives you've considered

Leave the code as is.

Additional context:

See #6266 for rationale and details. If this is adopted, I expect folks to raise issues about other places where a mixture of gestures map and script decorator are in use. As for add-ons, it is really up to authors, but my recommendation is to standardize around script decorator unless the situation warrants using gestures map.

Thanks.

josephsl added a commit to josephsl/nvda that referenced this issue Dec 22, 2020
…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).
josephsl added a commit to josephsl/nvda that referenced this issue Dec 22, 2020
…r. Re nvaccess#11964.

Convert the following scripts: NVDA+F12 (time and date), NVDA+C (clipboard data announcement), NVDA+Shift+B (battery status).
josephsl added a commit to josephsl/nvda that referenced this issue Dec 22, 2020
… 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).
josephsl added a commit to josephsl/nvda that referenced this issue Dec 23, 2020
…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.
josephsl added a commit to josephsl/nvda that referenced this issue Dec 23, 2020
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.
josephsl added a commit to josephsl/nvda that referenced this issue Dec 23, 2020
…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.
josephsl added a commit to josephsl/nvda that referenced this issue Dec 23, 2020
… 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.
josephsl added a commit to josephsl/nvda that referenced this issue Dec 23, 2020
…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.
josephsl added a commit to josephsl/nvda that referenced this issue Dec 23, 2020
…vaccess#11964.

Convert various settings scripts to use script decorator, including NVDA+2 (toggle speak typed characters), NVDA+U (probress bar output) and others.
josephsl added a commit to josephsl/nvda that referenced this issue Dec 23, 2020
…corator. Re nvaccess#11964.

Convert synth settings ring scripts: Control+NVDA+arrows/Control+NVDA+Shift+arrows (next/previous setting, increase/decrease current setting).
josephsl added a commit to josephsl/nvda that referenced this issue Dec 23, 2020
…script decorator. Re nvaccess#11964.

Convert document formatting scripts to use script decorator, all of them unassigned.
josephsl added a commit to josephsl/nvda that referenced this issue Dec 24, 2020
…tor. Re nvaccess#11964.

Convert unassigned settings scripts such as braille focus presentation, change braille cursor/shape, mouse text resolution, all unassigned.
josephsl added a commit to josephsl/nvda that referenced this issue Dec 24, 2020
…access#11964.

Convert tools scripts to script decorator, including app module info, UWP OCR, speech viewer, and others, some of them with gestures unassigned.
josephsl added a commit to josephsl/nvda that referenced this issue Dec 24, 2020
…access#11964.

Convert tools scripts to script decorator, including app module info, UWP OCR, speech viewer, and others, some of them with gestures unassigned.
josephsl added a commit to josephsl/nvda that referenced this issue Dec 24, 2020
…vaccess#11964.

Convert touch-specific scripts to use script decorator, including touch hover, right click, and touch mode toggle.
josephsl added a commit to josephsl/nvda that referenced this issue Dec 24, 2020
…orator. Re nvaccess#11964.

Convert keyboard emulation scripts for Control, Alt, Windows, Shift, and NVDA keys to use script decorator.
josephsl added a commit to josephsl/nvda that referenced this issue Dec 24, 2020
josephsl added a commit to josephsl/nvda that referenced this issue Dec 24, 2020
…nvaccess#11964.

Replace gestures map found in global commands with script decorator.
michaelDCurran pushed a commit that referenced this issue Jan 12, 2021
* Global commands: convert basic commands to use script decorator. Re #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).

* Global commands: convert system status scripts to use script decorator. Re #11964.

Convert the following scripts: NVDA+F12 (time and date), NVDA+C (clipboard data announcement), NVDA+Shift+B (battery status).

* Global commands: convert system focus and caret scripts to use script decorator. Re #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).

* Global commands: convert object navigation scripts to use script decorator. Re #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.

* Global commands: convert review cursor commands to script decorator. Re #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.

* Global commands: convert mouse and browse mode scripts to use script decorator. Re #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.

* Global commands: convert config dialogs/panels commands to use script decorator. Re #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.

* Global commands: convert config management scripts to use script decorator. Re #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.

* Global commands: convert settings scripts to use script decorator. Re #11964.

Convert various settings scripts to use script decorator, including NVDA+2 (toggle speak typed characters), NVDA+U (probress bar output) and others.

* Global commands: convert synth settings ring scripts to use script decorator. Re #11964.

Convert synth settings ring scripts: Control+NVDA+arrows/Control+NVDA+Shift+arrows (next/previous setting, increase/decrease current setting).

* Global commands: convert document formatting settings scripts to use script decorator. Re #11964.

Convert document formatting scripts to use script decorator, all of them unassigned.

* Global commands: convert unassigned settings scripts to script decorator. Re #11964.

Convert unassigned settings scripts such as braille focus presentation, change braille cursor/shape, mouse text resolution, all unassigned.

* Global commands: convert tools scripts to use script decorator. Re #11964.

Convert tools scripts to script decorator, including app module info, UWP OCR, speech viewer, and others, some of them with gestures unassigned.

* Global commands: convert braille display scripts to use script decorator. Re 311964.

Converted braille input and outpu scripts (except keyboard emulation) to use script decorator (tested with a HumanWare BrailleNote Touch Plus).

* Global commands: convert touch gestures to use script decorator. Re #11964.

Convert touch-specific scripts to use script decorator, including touch hover, right click, and touch mode toggle.

* Global commands: convert keyboard emulation scripts to use script decorator. Re #11964.

Convert keyboard emulation scripts for Control, Alt, Windows, Shift, and NVDA keys to use script decorator.

* Global commands: rearrange bypassInputHelp and remove commas from ends of function argument definitions. Re #11964.

* Global commands: lint (Flake8 E203, E251)

* Global commands: lint (Flake8 E501)

* Global commands: fix spelling - 'wil' -> 'will' in speech mode command description.

* Global commands: scriptHandler.script -> script

* Global commands: remove gestures map, replaced by script decorator. Re #11964.

Replace gestures map found in global commands with script decorator.

* Global commands: update copyright year

* Global commands: use allowInSleepMode flag for sleep mode toggle script. Re #11964.
@nvaccessAuto nvaccessAuto added this to the 2021.1 milestone Jan 12, 2021
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 a pull request may close this issue.

2 participants