Krombik / keysender

Node.js Desktop Automation for Windows.
MIT License
82 stars 9 forks source link

`scrollWheel` doesn't work [fix available] [Windows] #25

Open Mr-VIT opened 1 year ago

Mr-VIT commented 1 year ago

both Virtual and Hardware scrollWheel doesn't work. A window does not react.

OS: Windows 11

I fixed Virtual.scrollWheel https://github.com/Krombik/keysender/blob/d7eab7bc3bd287f2a756a87910130dd0e60b35e8/src/addon/virtual.cpp#L42 need swap low/high order words in wParam and x = 120 : `SendMessageA(hWnd, WM_MOUSEWHEEL, MAKEWPARAM(0, x120), MAKELPARAM(lastCoords.x, lastCoords.y));` according https://learn.microsoft.com/en-us/windows/win32/inputdev/wm-mousehwheel

Hardware.scrollWheel fix: just x*=120

Krombik commented 1 year ago

Hi, you can create pull request with this fix, then I check if it works.