我正在尝试编写一个脚本,该脚本将复制我的OS X设置。我特别想箭头键重新映射到CMD+ H,J,K,L。
该技术似乎与该Linux解决方案类似,不同之处在于,可以在中找到要修改的密钥文件/usr/X11/share/X11/xkb/symbols/us
。它实际上并没有按预期工作,并且似乎正在映射选项键。
如何在OS X中通过命令行重新映射键?
特定于应用程序的键盘快捷键(如“系统偏好设置”中的那些快捷键)存储在/Users/username/Library/Preferences/
顶级NSUserKeyEquivalents
密钥中相应应用程序的偏好文件中的中。
Those files can be read and written using the /usr/libexec/PlistBuddy
and defaults
programs on the command line.
$ defaults read com.apple.Automator NSUserKeyEquivalents
{
"Hide Library" = "@$l";
"Show Library" = "@$l";
}
$ defaults write com.apple.Terminal NSUserKeyEquivalents -dict-add "About Terminal" '^@$a'
Symbols and their meanings:
@
is Command$
is Shift^
is Control~
is OptionAdditionally, you can simply copy these files to other machines to take your user preferences with you.
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句