0

In Applescript, how can I send the keystroke for the right control key on the keyboard? How about right command key? Ultimately, I want to right-click in WINE (winehq's FAQ explains that's not currently possible with ctrl+click). But, it works great via KeyRemap4MacBook, although I need to send the right key.

tell application "System Events" to key code ???????
4

2 回答 2

1

对于正确的控制,它是:

tell application "system events"  
key code 62   
end tell
于 2017-11-13T09:26:52.273 回答
0

请参阅 Events.h 或https://github.com/tekezo/KeyRemap4MacBook/blob/master/src/bridge/generator/keycode/data/KeyCode.data

正确的命令应该是 0x36 或 54,但这对我不起作用:

delay 1
tell application "System Events" to key code 54

我也尝试添加__KeyToKey__ KeyCode::COMMAND_R, KeyCode::Q到 private.xml。即使您使用 KeyRemap4MacBook 更改tell app "System Events" to key code 0为其他键,也会插入。aa

于 2013-04-10T08:08:08.707 回答