> For the complete documentation index, see [llms.txt](https://docs.acecentre.org.uk/products/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.acecentre.org.uk/products/morace/guides/controlling-mouse.md). Agents can also search and read this documentation through its [MCP server](https://docs.acecentre.org.uk/products/~gitbook/mcp).

# Controlling the mouse

**Mouse mode**

Once a device is connected by default it can send characters. But if you want to control it as a mouse you can enter the mouse mode. This is done with the morse command of `.-.--` (configurable in `userConfig.py`) and then the device can send mouse commands

*NB: in iOS you need to make sure Settings -> Accessibility -> AssistiveTouch -> On.*

Then to move the mouse use these commands

| <p><br>Left Up<br>.--.</p> |   <p>Up<br>-</p>  | <p>Right Up<br>...-</p>     |
| -------------------------- | :---------------: | --------------------------- |
| <p>Left<br>..</p>          |                   | <p>Right<br>...</p>         |
| <p>Left Down<br>...--</p>  | <p>Down<br>--</p> | <p>Right Down<br>...---</p> |

By default it will only move 5 pixels (default is changeable - see `default_mouse_move_step` in `user/config.py)`. If you wish the mouse to start moving in one direction and stop when you next send any switch press try using the **REPEAT** mode

. `Repeat Mode`

You would send the mouse movement you wish to do - THEN send the repeat command. Eg. Down - Repeat ( `-- .)` - will repeat moving down and stop on the first press.

You can increase or decrease the **speed of movement** using some different options:

`.-..--` Increase speed

`.-..-.` Decrease speed

`.--.-.` Set Speed to 1

`.--.--` Set Speed to 5

**Mouse buttons are:**

* `.--` Right Click
* `.-` Left Click
* `..--` Double Right click
* `..-` Double Left click

**Click and hold**

`-.` Left click and hold (enter again to toggle off)

`-..` Right click and hold (enter again to toggle this off)

So to drag the mouse you could use this technique. Or you could use the **REPEAT MOUSE** command (`.`)

#### To drag the mouse

`-. (Click and hold)`\
`- (Up)`\
`. (Repeat moving up)`\
`. (release moving when ready)`\
`-. (Release Click and Hold)`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.acecentre.org.uk/products/morace/guides/controlling-mouse.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
