pynput icon indicating copy to clipboard operation
pynput copied to clipboard

on_scroll listener not work outside the cmd window

Open ReinforceZwei opened this issue 5 years ago • 2 comments

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 ?

ReinforceZwei avatar Mar 23 '19 09:03 ReinforceZwei

Do you run the cmd window as an administrator account?

moses-palmer avatar Mar 31 '19 19:03 moses-palmer

Do you run the cmd window as an administrator account?

I got the same result even running as an administrator

ReinforceZwei avatar Apr 06 '19 07:04 ReinforceZwei