> For the complete documentation index, see [llms.txt](https://kap35.gitbook.io/kap-engine-wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kap35.gitbook.io/kap-engine-wiki/user-manual/mouse/getmouse.md).

# getMouse

{% hint style="warning" %}
This function is only accessible in a component function
{% endhint %}

### Why

while your game is running, you could need to get mouse position.

This function can give you the position of mouse.

### Example

```cpp
// You are in component function
Tools::Vector2 pos = getMouse().getPosition();
```
