how to hold a button using pyautogui code example Example: python move mouse slowly import autopy # pip install autopy autopy.mouse.smooth_move(100, 600)