# Toggling the mouse/cursor

In order to toggle the mouse/cursor we use the `CursorManager` , You have to only call the `.ShowCursor()` method once! As its "Requesting" the cursor.

If you request it too many times you will have to hide it the same amount of time! So only call this when opening your menu and when closing it, don't call it each frame while your menu is open.

```csharp
// Show the cursor :
CursorManager.Get().SetCursor(CursorManager.TYPE.Normal);
CursorManager.Get().ShowCursor(true, true);

// Hide the cursor :
CursorManager.Get().ShowCursor(false,false);
```

{% hint style="warning" %}
Known issue : We don't know yet how to properly disable all actions such as opening the inventory, opening the character wheel etc. So it can be a little bit messy when using input fields inside menus.\
**If you want to contribute to the modding research, join us on our** [**discord**](https://www.greenhellmodding.com/discord)**.**
{% endhint %}


---

# Agent Instructions: 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:

```
GET https://docs.greenhellmodding.com/client-code-examples/toggling-the-mouse-cursor.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
