asweigart / pyautogui

A cross-platform GUI automation Python module for human beings. Used to programmatically control the mouse & keyboard.
BSD 3-Clause "New" or "Revised" License
10.45k stars 1.26k forks source link

PYAUTOGUI and URSINA #875

Open jiananlan opened 2 months ago

jiananlan commented 2 months ago

to let the player in the ursina move, i use pyautogui to press w,s,a,d to achieve the movement.(in the ursina, w,s,a,d can make the player moves) . unluckily it doesn't work:( My code: def input(key): if key=='up arrow': pyautogui.keyDown('w') if key=='up arrow up': pyautogui.keyUp('w') and i tried adding 'print(key)': the 'w' doesn't show, which means 'w' wasn't clicked:( how to fix it??