Advertisement
Hello_MMM

Listener

Feb 9th, 2020
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. from pynput import mouse
  2.  
  3. def on_click(x, y, button, pressed):
  4.     if pressed and button == mouse.Button.left:
  5.         print('HelloWorld')
  6.  
  7. with mouse.Listener(on_click=on_click) as listener:
  8.     listener.join()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement