pynput
pynput copied to clipboard
on_scroll listener not work outside the cmd window
I am using Windows 7 and Python3.7.2 to run my code. Here is a simple test code:
def on_scroll(x, y, dx, dy):
print(dx,dy)
with mouse.Listener(on_scroll=on_scroll) as listener:
listener.join()
If my cursor is inside the cmd window, it can print the dx
and dy
normally.
But if I move the cursor out of the window, it don't work.
I have also tested on ubuntu 17 with Python3.6.7 and Windows 10 with Python3.7.2 and it work perfectly.
Any idea ?
Do you run the cmd
window as an administrator account?
Do you run the
cmd
window as an administrator account?
I got the same result even running as an administrator