moses-palmer / pynput

Sends virtual input commands
GNU Lesser General Public License v3.0
1.74k stars 244 forks source link

the listener didn't work proper when i moved the cursor or clicked the mouse within the range of "everything" window #543

Open AfreyAwsome opened 1 year ago

AfreyAwsome commented 1 year ago

Description the listener didn't work proper when i moved the cursor or clicked the mouse within the range of "everything" window,but the code worked well outside of the range of "everything" window

Platform and pynput version win10, pynput 1.7.6, everything 1.4.1 (an portable version, not an installation version)

hook.py

from pynput.mouse import Listener

def on_click(x, y, button, pressed):
    print(f'x: {x}, y: {y}')
def on_scroll(x, y, dx, dy):
    print('Scrolled {0} at {1}'.format('down' if dy < 0 else 'up', (x, y)))
def on_move(x, y):
    print(f'x: {x}, y: {y}')

with Listener(on_click=on_click,on_scroll=on_scroll,on_move=on_move) as listener:
    listener.join()

when i moved the cursor or clicked within the range of the "everything" window ,nothing happend,nothing printed on the console. But as long as i moved the the cursor or clicked outside the range of the "everything" window , my code did work well. i don't understand