You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
frompynputimportmousedefon_scroll(x, y, dx, dy):
print(f"dx={dx}, dy={dy}")
# Collect events until releasedwithmouse.Listener(on_scroll=on_scroll) aslistener:
listener.join()
I'm finding this prints:
dx=0, dy=1# when I scroll up (CORRECT)dx=0, dy=-1# when I scroll down (CORRECT)dx=0, dy=1# when I scroll left (INCORRECT, should be dx=1, dy=0)dx=0, dy=-1# when I scroll right (INCORRECT, should be dx=-1, dy=0)
Thanks for any help, and this amazing lib! :)
The text was updated successfully, but these errors were encountered:
Description
When I use a mouse listener and horizontally scroll, the callback returns a change in
dy
(notdx
).Platform and pynput version
Linux Mint 22 (based on Ubuntu 24.04), pynput==1.7.7
Full conda envinronment.yaml
To Reproduce
I'm finding this prints:
Thanks for any help, and this amazing lib! :)
The text was updated successfully, but these errors were encountered: