Skip to content

Split out global commands into distinct scripts #7314

@derekriemer

Description

@derekriemer

For @dictationbridge, we want to support speech commands like "speak current line" and "spell current line"
This makes our code ugly, because we literally have to send "speakCurrentLine twice to spell it, and it is not as clean of code. I propose the following.

  1. Split any script in globalCommands.GlobalCommands which looks at getScriptRepeatCount into multiple scripts as necesary, I.E. speakCurrentLine, spellCurrentLine, spellCurrentLinePhonetically.
  2. Make an overarching script which dispatches behaviors based on the number of times its been called, I.e. reportCurrentLine would check and if the script has fired twice, would call into spellCurrentLine, etc.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions