点击时将Esc映射到Caps Lock的Applescript;按下时控制大写锁定(macOS Sierra)? [英] Applescript to Map Esc to Caps Lock when tapped; Control to Caps Lock when pressed (macOS Sierra)?

查看:140
本文介绍了点击时将Esc映射到Caps Lock的Applescript;按下时控制大写锁定(macOS Sierra)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我非常了解karabiner元素,而karabiner元素仍在开发中,以便在macOS Sierra中启用此键映射.但是,当前它不起作用.

我的想法是,如果我在首选项/键盘/修改键"中将Caps Lock映射到Control,那将使我到达一半.我已经看到人们使用AppleScript做过的一些有趣的事情此处.我希望有一种简单的方法可以通过AppleScript实现此目的.还值得一提的是karabiner-elements可以交换Caps Lock和Escape(此处是他们的示例).

此外,我尝试使用Keyboard Maestro,但是我的宏无法识别MacBook Pro 2015的Caps Lock键-我确实在键盘偏好设置中将Caps Lock设置为无操作",重新启动等.下面是屏幕快照,该屏幕截图应显示在Keyboard Maestro中,以供参考.

简而言之,我尝试了所有事情,并希望有一个简单的解决方案可以通过AppleScript实现.预先感谢.

解决方案

也许您可以尝试创建这是一个有用的工具,您可以使用它来编辑键绑定文件. /p>

希望这会有所帮助.

I am well aware of karabiner-elements which is still in development to enable this key mapping in macOS Sierra. However, at the current moment it doesn't work.

My thought is that if I map Caps Lock to Control in Preferences/Keyboard/Modifier Keys that gets me half way there. I have seen some interesting things people have done with AppleScript here. I am hoping there is a simple way to achieve this via AppleScript. Its also worth mentioning that karabiner-elements is capable of swapping Caps Lock and Escape (here are their examples).

Moreover, I tried to use Keyboard Maestro but my macro wouldn't recognize my Caps Lock key for my MacBook Pro 2015--I did set my Caps Lock to "No Action" in keyboard preferences, restarted, etc. Below is a screenshot of what it should look like in Keyboard Maestro for reference.

In short, I tried everything and hope there is a simple solution to achieve this via AppleScript. Thanks in advance.

解决方案

Perhaps you could try creating a custom key binding file, which works natively.

Also, here is a helpful tool you can use to edit the key bindings file.

Hopefully that helps.

这篇关于点击时将Esc映射到Caps Lock的Applescript;按下时控制大写锁定(macOS Sierra)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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