Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The horizontal scrolling function 'ScrollH()' does not work as expected on windows #92

Open
vosel opened this issue Dec 17, 2017 · 2 comments
Labels
Bug An error or incorrect implementation Win Relating specifically to Windows
Milestone

Comments

@vosel
Copy link

vosel commented Dec 17, 2017

There is an issue with the ScrollH() function's behaviour on windows platform.
In the documentation to the function, it says that the integer parameter passed to it indicates the amount of the simulated scrollwheel 'notches'. This works fine for the vertical scroll - ScrollV() (the bigger the absolute value of the parameter, the more scroll notches are simulated).
But for the horizontal scrolling - ScrollH(), the amount of simulated notches does not depend on the parameter's absolute value. The simulated scrolling always scrolls by one 'notch' (in the direction, which depends on the sign of the parameter's value).

@vosel
Copy link
Author

vosel commented Dec 17, 2017

The reason of such behaviour is probably caused by the windows handling of the MOUSEEVENTF_HWHEEL events.
The winapi's SendInput() function is treating it as a 'wheel tilt' event and assumes that the wheel could be tilted only by one 'notch'. So, it does not use the parameter's absolute value - only it's sign.

See the difference between MOUSEEVENTF_WHEEL and MOUSEEVENTF_HWHEEL in the MSDN documentation page (note the description of the dwData parameter).

@dkrutsko
Copy link
Member

Thanks, I'll take a look!! Though I tested that feature a lot and never experienced that problem myself.

@dkrutsko dkrutsko added the Bug An error or incorrect implementation label Dec 18, 2017
@dkrutsko dkrutsko added the Win Relating specifically to Windows label Mar 13, 2018
@dkrutsko dkrutsko added this to the Robot 2.1.0 milestone Mar 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug An error or incorrect implementation Win Relating specifically to Windows
Development

No branches or pull requests

2 participants