How to listen to the mouse on Python 3.6? I tried it like this, but it didn’t work, it doesn’t output anything:
from pynput import mouse def on_release(key): pass def on_click(key): print(key) with mouse.Listener( on_press=on_click, on_release=on_release) as listener: listener.join() UPD: I need to track specific mouse clicks, not the position of the mouse at this moment. And not only left / right / wheel, but also additional buttons too.