# Mouse coordinates not working in the area of the screen where there is a form

**URL:** <https://discourse.processing.org/t/mouse-coordinates-not-working-in-the-area-of-the-screen-where-there-is-a-form/9024>\
**Category:** Coding Questions\
**Created:** [March 6, 2019, 5:08pm UTC](https://discourse.processing.org/t/mouse-coordinates-not-working-in-the-area-of-the-screen-where-there-is-a-form/9024 "2019-03-06T17:08:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![davide93](https://avatars.discourse-cdn.com/v4/letter/d/6de8d8/32.png) [@davide93](https://discourse.processing.org/u/davide93)\
**Post date:** [March 6, 2019, 5:08pm UTC](https://discourse.processing.org/t/mouse-coordinates-not-working-in-the-area-of-the-screen-where-there-is-a-form/9024/1 "2019-03-06T17:08:05Z")

</div>

Hi there,  
I’m trying to use processing for an html5 page.  
I want to draw lines for all the page on mouse moving.  
When I move the mouse on the area of the page in which there is a form the lines are not drawn.  
I would like it could work even there.  
If I move the mouse below the form it works and the lines are drawn even under the form.  
Please can anybody give me any hint to fix it?

Thank you in advance,

Davide

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [March 7, 2019, 2:21am UTC](https://discourse.processing.org/t/mouse-coordinates-not-working-in-the-area-of-the-screen-where-there-is-a-form/9024/2 "2019-03-07T02:21:58Z")

</div>

what i see with p5.js  
is that the mouse is working from top left ( 0,0 ) of canvas  
to right bottom of browser window!

and good style would be to limit that by some code  
comparing mouse X,Y with width and height.

[https://editor.p5js.org/kll/sketches/BJYFW\_hTQ](https://editor.p5js.org/kll/sketches/BJYFW_hTQ)

now you want what? i not think it is possible to read -x y mouse?  
so first do some tests about  
[https://editor.p5js.org/kll/full/BJYFW\_hTQ](https://editor.p5js.org/kll/full/BJYFW_hTQ)  
[https://editor.p5js.org/kll/present/BJYFW\_hTQ](https://editor.p5js.org/kll/present/BJYFW_hTQ)

also about browser settings, still the limit will be the browser window.  
( as p5js is running inside a browser )  
but with “F11” firefox and chrome go fullscreen.

---

<div class="post-metadata">

**Author:** ![davide93](https://avatars.discourse-cdn.com/v4/letter/d/6de8d8/32.png) [@davide93](https://discourse.processing.org/u/davide93)\
**Post date:** [March 8, 2019, 5:51pm UTC](https://discourse.processing.org/t/mouse-coordinates-not-working-in-the-area-of-the-screen-where-there-is-a-form/9024/3 "2019-03-08T17:51:52Z")

</div>

Hi Kll, thank you for getting back to me!!!  
I think my situation is different. there is a php authentication form that probably goes over my processing sketch. So there is the area used from the login that doesn’t communicate with my processing sketch.
