Reputation: 513
I know that you can hold down certain keys with pyautogui, but is there a way to hold down the left click key with keyDown and keyUp (or with another module)? Thanks in advance if you help.
Upvotes: 0
Views: 11946
Reputation: 39354
From the documentation you can use mouseDown()
:
>>> pyautogui.mouseDown(); pyautogui.mouseUp() # does the same thing as a left-button mouse click
>>> pyautogui.mouseDown(button='right') # press the right button down
>>> pyautogui.mouseUp(button='right', x=100, y=200) # move the mouse to 100, 200, then release the right button up.
Upvotes: 3