I need to press and release the right arrow key for a little project, but I don’t know what text to use for arrow keys.
I’ve tried to say stuff like “right arrow”, “K_RIGHT”, and other things but it just gives me some huge error that I can’t read through. I am using Visual Studio Code, incase anyone needs to know that.
Here’s code if needed:
import keyboard
def moveArrow(times):
while times > 0:
keyboard.press_and_release("right")
times = times - 1
keyboard.add_hotkey("ctrl+shift+;", moveArrow, 20, True)
keyboard.wait("esc")