我如何使大写锁定工作像Esc在Mac OS X?
当前回答
In order to actually swap the escape key with the caps lock key (not just map one to the other) using both PCKeyboardHack and KeyRemap4MacBook, you have to follow the instructions in this thread, mapping the caps lock key to a keycode not used by the keyboard but accounted for by KeyRemap4MacBook (eg. 110). Then, in PCKeyboardHack, select the appropriate option that maps that keycode to escape (in the case of 110, it's "Application Key to Escape"). Here's what your KeyRemap4MacBook preferences should look like (provided you've selected the "show enabled only" checkbox).
我最初试图发布这个信息作为cwd的优秀答案的编辑,但它被拒绝了。我鼓励任何想要走我描述的路线的人先读一下他/她的回答。
其他回答
您还可以使用DoubleCommand来重新映射这个键和其他键。
IIRC,它会将Caps Lock映射为Esc。
In order to actually swap the escape key with the caps lock key (not just map one to the other) using both PCKeyboardHack and KeyRemap4MacBook, you have to follow the instructions in this thread, mapping the caps lock key to a keycode not used by the keyboard but accounted for by KeyRemap4MacBook (eg. 110). Then, in PCKeyboardHack, select the appropriate option that maps that keycode to escape (in the case of 110, it's "Application Key to Escape"). Here's what your KeyRemap4MacBook preferences should look like (provided you've selected the "show enabled only" checkbox).
我最初试图发布这个信息作为cwd的优秀答案的编辑,但它被拒绝了。我鼓励任何想要走我描述的路线的人先读一下他/她的回答。
打开键盘首选项,点击修改键…您可以将大写锁定键更改为控制、选项、转义或命令。
如果你不想安装第三方应用程序,并且你真的只关心iTerm中的vim,下面的方法是有效的:
如上所述,将CapsLock重新映射为Help。
短版本:使用plutil或类似编辑~/Library/Preferences/ByHost/. globalpreferences *。Plist,它应该看起来像这样:
<key>HIDKeyboardModifierMappingDst</key>
<integer>6</integer>
<key>HIDKeyboardModifierMappingSrc</key>
<integer>0</integer>
重新启动!简单的登出和登录对我来说不起作用。
在iTerm中,为Help添加一个新的键映射:发送十六进制代码0x1b,它对应于Escape。
我知道这并不完全是要求的,但我认为许多人寻找这样的解决方案的目的实际上是这个更专业的变体。
Seil尚未在macOS Sierra (10.12 beta)上使用。因此,我一直在使用键盘大师与这些设置:
这条github评论的出处:https://github.com/tekezo/Seil/issues/68#issuecomment-230131664
推荐文章
- 如何配置Mac OS X术语,使git有颜色?
- 如何在可视块模式插入?
- 我如何确定文件编码在OS X?
- 使iTerm以与其他操作系统相同的方式翻译“元键”
- 错误:无法在ARM处理器上的Homebrew中安装英特尔默认前缀(/usr/local)
- 在Mac OS X上哪里安装Android SDK ?
- 强迫自己掌握vi的最好方法是什么?
- Mac/OS X上的/var/lib/docker在哪里
- Xcode构建失败“架构x86_64未定义的符号”
- 如何回到行之前编辑的最后一个在Vim?
- 在OSX 10.11中安装Scrapy时,“OSError: [Errno 1]操作不允许”(El Capitan)(系统完整性保护)
- 如何在Mac OS X 10.6中使硬件发出哔哔声
- 从Cocoa应用程序执行一个终端命令
- Android Studio无法找到有效的Jvm(与MAC OS相关)
- 如何跳转到一个特定的人物在vim?