Skip to content

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

@josephsl

Description

@josephsl

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions