0

I'm trying to call osascript in Python to simulate key presses with something like this:

cmd = """
    osascript -e 'tell application "System Events" to keystroke "e"'
    """
os.system(cmd)

How can I send key presses for the up/down/left/right arrow keys?

1 Answers1

1

Key codes for the arrow keys: left - 123 right - 124 down - 125 up - 126