0

Does anyone have any idea (in Python) how I can do something to detect if the user is holding the left mouse click?

I don't say just a click, but if he holds the click, until he releases his finger.

Thank you very much in advance!

I've already tried using:

from win32api import GetAsyncKeyState

But, this only seems to work for the click event.

Xpray 935
  • 15
  • 3
  • Have you read the documentation? `GetAsyncKeyState(VK_LBUTTON)` will tell you whether the button is down or up right now. You have to poll it to figure out when the state changes. If you want events, you'll need to use a "window hook", which is more difficult. – Tim Roberts Sep 21 '22 at 00:25
  • See also https://stackoverflow.com/questions/41688871/how-to-detect-if-mouse-was-clicked – Stefan Wuebbe Sep 21 '22 at 04:28

0 Answers0