标签: python macos osascript
我试图在Python中调用osascript来模拟按键操作:
cmd = """ osascript -e 'tell application "System Events" to keystroke "e"' """ os.system(cmd)
如何发送上/下/左/右箭头键的按键?
答案 0 :(得分:0)
箭头键的键控代码: 左 - 123 对 - 124 下来 - 125 up - 126