Skip to content

mouse.move(new Point(x, y)) not working in Windows 11 #498

Closed
@maifeeulasad

Description

@maifeeulasad

I'm trying to move my mouse curor into some top left position, then click on it. And finally try typing something. But it doesn't seem to be moving, although it's clicking and typing for sure

Desired execution environment / tested on

  • Virtual machine
  • Docker container
  • Dev/Host system

Code & More Details

const {
  mouse,
  keyboard,
  sleep,
  Button,
  Point
} = require("@nut-tree/nut-js");
...
async function x(message){
  console.log(await mouse.getPosition())
  await mouse.move(new Point(200, 200));  // <---------- issue here
  await sleep(2000);
  await mouse.click(Button.LEFT);
  await sleep(2000);
  await keyboard.type(message);
}
...
(async () => {
  await x("meaw")
})();

It kept clicking a button, that's how I noticed it was clicking. Then I moved it on top of notepad, and started a program, it was typing, but real slow.

Now the question remains, why can't I move my mouse?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions