苹果脚本模拟按键事件 [英] Apple script simulate key events

查看:855
本文介绍了苹果脚本模拟按键事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道的关键codeS从F1-F12的所有功能键。从previous搜索查询,我发现钥匙code 107通过运行这个把亮度下降。

I want to know the key codes for all the function keys from F1-F12. From previous search queries I have found keycode 107 to turn brightness down by running this


回声告诉应用程序\\系统事件\\
关键code 107
最后告诉| osascript

和我猜测,模拟F1键,但奇怪的是 113 轮番亮度可达。我一直没能找到关键codeS任何其他个Fn键。任何帮助吗?是否有这个在那里我可以拿到钥匙codeS打了一个漂亮的表。最后,我希望能够直接执行这些键或以某种方式模拟这些行动的行动。任何事情就可以了。

And I'm guessing that simulates the F1 key but the weird thing is 113 turns the brightness up. I haven't been able to find key codes for any other Fn keys. Any help? Is there a nice table made for this where I can get the keycodes. In the end I want to be able to either directly perform the actions that these keys do or somehow simulate those actions. Anything would be fine.

推荐答案

重点code 107的不可以的F1 code;它是一个独立的code的亮度控制。也有一个用于音量控制,但它是破碎。键codeS是在半随机的顺序,不能predicted。功能键是:

Key code 107 is not the F1 code; it is a separate code for Brightness control. There is also one for Volume control, but it is broken. The key codes are in semi-random order and can not be predicted. The Function keys are:

F1 = 122 F2 = 120 F3 = 99,F4 = 118,F5 = 96,F6 = 97,F7 = 98,F8 = 100,F9 = 101,F10 = 109,F11 = 103,F12 = 111

F1=122, F2=120, F3=99, F4=118, F5=96, F6=97, F7=98, F8=100, F9=101, F10=109, F11=103, F12=111

你可以找到重点$ C $的详尽清单CS这里

这篇关于苹果脚本模拟按键事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆