Noob need to record mouse when on another window


I would like to record the mouse’s mouvement when working on a software like photoshop.

The code below is perfect but how to use it when the mouse is on another window ?

void setup() {
  size(640, 360);

void draw() {
  if (mousePressed == true) {
    line(mouseX, mouseY, pmouseX, pmouseY);

Hope we can find a solution !
I have never use code before beware !

1 Like

Hi, you will need to use some extra Java functions.

Maybe you can look at this:

And this:

1 Like