XOJO Web mouse position (Canvas)


is there any way to the position of the mouse on a canvas except in the pressed.eventhandler ?

I would like to make a signature area where i get the first keypress Position and then just use a timer to get the sampled mouse movment until the mousebutton is released.

But actually i do not have any clue how to get data from the mousemovement or the mousekeyup/released event (which are missing in the web apps)?

I read a lot here and on the web, people mentioning the different style how xojo.web is working and the needs to keep trafficrates low.
But actually any web-app knows where the mousePointer is, how would the graphic changes in the built in buttons be made when your mousehover over them is recognized ?

Is there a simple way to access the mousepointer position(x,y) and the status of the left mouse key (pressed or not ?) in a XOJO web app ?

Thanks in advance,


The only way to accomplish this properly is by using the WebSDK. I do, however, provide GraffitiSignature for such a use.

1 Like

Hello Anthony,

your GraffitiSuite looks really impressive.
Actually i am not in the position to make decisions about purchasing external libs.

Anyway any help would be appreciated.

You should investigate the WebSDK, then, and write something using JavaScript. Passing data back and forth between the server and client for such a drawing routine, even if Xojo did provide those mouse events, would be clumsy and latency would likely infuriate users.

1 Like

Hello Anthony,

i understand the needs to keep datatransfer as low as possible.
But some solutions like the signature-area just need that mouse movment and button event tracking.
Diving into WebSDK the last days, now more focussing on understanding java and json.
At least i asked my boss about the future needs of a better UI handling, maybe he looks into it too and makes a decision. Thank you for your respnose.



This will help. However, I don’t see any way to get the mouse coordinates without clicking the mouse.

Hi Michael,

thanks for your help. Will take a look into it next week.

Regards, Marco