> For the complete documentation index, see [llms.txt](https://learnpython.strivemath.com/p5-python-web/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learnpython.strivemath.com/p5-python-web/reference/events/mouse/keyboard-4.md).

# mouseWheel()

## Example

<figure><img src="/files/6jPPgvnAHxHvTz9t2KYI" alt=""><figcaption><p>When the mouse wheel is scrolled</p></figcaption></figure>

## Syntax

```
def mouseWheel([event]):
    # do stuff
    # work with event with property delta, like event.delta
```

<details>

<summary>Full Code Example</summary>

```python
```

</details>

## Description

This function is called any time a **vertical mouse wheel** event is detected, either triggered by rolling an actual mouse wheel or by a touchpad.

{% hint style="info" %}
Find these documents helpful? Let the people who made them help your child learn to code at [**Strivemath**](https://www.strivemath.com/)<mark style="color:blue;">**!**</mark>

We'd love to hear your Feedback/Comments [here](https://docs.google.com/forms/d/e/1FAIpQLSeqorBAGTya-YBRI-VFjJxtgQtCz3ucGDI96K96sNyuaGuvdw/viewform?usp=sf_link).
{% endhint %}
