Applescript:如何在MacOS上模拟多个按键

时间:2016-09-25 03:10:48

标签: applescript

我知道像Apple脚本代码

key code 45 using command down

将用于模拟按键cmd + n

但我希望模拟按键Esc + fn,而上述语法根本不起作用。

1 个答案:

答案 0 :(得分:0)

转义键和功能键都有AppleScript键码。

List of AppleScript keycodes

功能为63,转义为53。

以下AppleScript会触发Fn + Esc:

tell application "System Events"
   key code 63
   key code 53
end tell