Package Guides
/

Mouse

Overview

The `mouse` package contains commands and functions for controlling the mouse/cursor, as well as scrolling.

Clicking

  • left click
  • right click
  • double-click
  • ⌘-click
  • ⌥-click
  • ⇧-click
  • click at previous mouse resting point
  • triple-click
  • press mouse
  • release mouse
  • mouse dwell clicking (will automatically perform a click when the mouse stops moving for a configurable amount of time)

Scrolling

  • left
  • right
  • up
  • down

Mouse Movement

  • mouse left [x]
  • mouse right [x]
  • mouse up [x]
  • mouse down [x]
Configuration

To change the default distance (for when no distance argument is spoken)

```

Settings.mouse =

  defaultMouseDelta:

    x: 2

    y: 1

``

Mouse Grid

This is a new and experimental feature. Currently it only works on a single monitor (will enhance for multiple monitors soon)

  • The `mouse:grid-move` @[email protected] command toggles the mouse grid on/off.
  • For a command mnemonic, think "screen grid" => "squid" for short.
  • The screen grid can be used whether the grid is being shown on the screen or not. So if you know the rough coordinates of the screen location, you can use the command without displaying the grid first.

We spent a lot of time experimenting with different grid layouts to minimize the mental overhead of choosing a location on the screen, but still allowing access to every possible screen location from a single utterance.

Conveniently, when the grid is open, you can still click, scroll, and type "through" it as if it was not even there. Also, all other commands will still work while the grid is open.

Here's how to use the visual grid reference

  1. Enable the grid by saying @[email protected]
  2. Locate the item you would like to click on, and notice which "cell" it resides in.
  3. For the chosen cell, say the center number, then the vertical sub-coordinate, then the horizontal sub-coordinate
  4. Saying just these three numbers allows you to click anywhere on the screen with fairly good precision.
  5. Optionally, you can stop after saying the center number to move the mouse to the center of that "cell"
  6. Optionally, you can stop after saying the center number and the vertical sub-coordinate, to move somewhere along the left border of that "cell"

Tip: for "zero" use the word @[email protected] since it is quicker.

Tip: Don't say fully pronounced number forms, for example when saying "3265" say @three two six [email protected] NOT @thirty two sixty [email protected]

Tip: For '10', '20', '30', '40', etc. as well as '12', '13', '14', etc you can say the shortened name i.e. @[email protected], @[email protected], @[email protected], @[email protected] etc. so "8012" could be @eighty [email protected] OR @eighty one [email protected], they would be interpreted the same.

Tip: Use @[email protected] for "00". So to move to [36, 0, 0] you would say @three six [email protected] (top left of cell 36)

Tip: On the sub-grid labels it does not show a label for "0" since that is where the horizontal and vertical labels intersect, but it is still a valid option. For example @squid four five oh [email protected] would move the mouse to the top center of cell 45.

Configuration

To change the background grid overlay color:

```

Settings.mouse.grid.backgroundColor = '11000000' # an ARGB value

``

To set whether or not the grid automatically disappears after using the `mouse:grid-move` command:

```

Settings.mouse.grid.hideAfterUse = true # default is false

``

Example

‍Let's say we want to click on the first search result "Wikipedia" on this webpage:

After enabling the mouse grid the page would look as shown above.

Notice the link falls within cell "32". Inside that cell the "Wikipedia" link sits at vertical "6" and horizontal "3" (there are multiple horizontal numbers that would work in this case). So to move the mouse over the link you would say @squid three two six [email protected] If you miss slightly, the quickest way to finish is to use @mouse <up/down/left/right>@