Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试在 Python 中调用 osascript 来模拟按键,如下所示:
cmd = """ osascript -e 'tell application "System Events" to keystroke "e"' """ os.system(cmd)
如何发送向上/向下/向左/向右箭头键的按键?
方向键的键码:左 - 123 右 - 124 下 - 125 上 - 126