# Mouse isPressedIn not working

**URL:** <https://discourse.psychopy.org/t/mouse-ispressedin-not-working/43161>\
**Category:** Online experiments\
**Tags:** pavlovia\
**Created:** [December 5, 2024, 11:21am UTC](https://discourse.psychopy.org/t/mouse-ispressedin-not-working/43161 "2024-12-05T11:21:06Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [December 5, 2024, 2:04pm UTC](https://discourse.psychopy.org/t/mouse-ispressedin-not-working/43161/2 "2024-12-05T14:04:49Z")

</div>

Are you defining a function every frame but never using it?

Why not just:

```auto
if mouse.isPressedIn(confirm_button_prova):
      confirm_button_prova.fillColor = [-1,0.04,-1]
box.pos = mouse_getPos()

```

However, you might need to use a colour variable for the JS to work.

> [@Colour schemes for colour-blind participants](https://discourse.psychopy.org/t/colour-schemes-for-colour-blind-participants/42994):
>
> I’ve created a Google sheet which allows the creation of colour lists more suitable for colour-blind participants than the standard primary colours one might use. The reference for the colours is Tol (2021). Tol, P. 2021. “Colour Schemes.” Technical note SRON/EPS/TN/09-002 3.2. SRON. URL: [https://personal.sron.nl/~pault/data/colourschemes.pdf](https://personal.sron.nl/~pault/data/colourschemes.pdf). Web version [Paul Tol's Notes](https://personal.sron.nl/~pault/) Please use this thread for discussions about colour sets suitable for experiments in PsychoPy. Feel free to ask me to a…

---

_[View the full topic](https://discourse.psychopy.org/t/mouse-ispressedin-not-working/43161)._
