> 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).

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
