octalmage / robotjs

Node.js Desktop Automation.
http://robotjs.io
MIT License
12.37k stars 961 forks source link

robot.scrollMouse() moves the cursor to (0, 0) instead of scrolling #586

Open branbarh opened 4 years ago

branbarh commented 4 years ago

Expected Behavior

Mouse should scroll

Current Behavior

Mouse does not scroll; instead, the cursor moves to (0, 0).

When used in conjunction with "setInterval," the mouse gets stuck permanently at (0, 0) (until ctrl+C is pressed in Terminal).

Steps to Reproduce

var robot = require("robotjs");

robot.scrollMouse(0, 10);

Running the above code on macOS (I am using High Sierra) causes the issue to occur.

Robot.js was the only Node module I was using.

Environment / Specs

GDur commented 3 years ago

For me robot.scrollMouse does not work at all. (Windows 10 here)

GDur commented 3 years ago

https://github.com/octalmage/robotjs/pull/508/files This issue seems to have been resolved. But it probably was reintroduced later on...

Edit: This really is the problem! It works on windows using the following steps:

Thanks to https://github.com/gera2ld who fixed it originally!

danielehrhardt commented 3 years ago

For me robot.scrollMouse does not work at all. (Windows 10 here)

Same Problem here but only on Windows. For Mac it does work fine.