本文主要是介绍让macOS外接键盘Home/End键可用,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
让 Mac 外接键盘支持 HOME 键_macos home键-CSDN博客
步骤:
1、打开终端创建文件夹,并编辑 DefaultKeyBinding.dict 文件
mkdir -p ~/Library/KeyBindings
vim ~/Library/KeyBindings/DefaultKeyBinding.dict
2、往DefaultKeyBinding.dict添加下面的内容
{
/* Remap Home/End keys */
/* Home Button*/
"\UF729" = "moveToBeginningOfLine:";
/* End Button */
"\UF72B" = "moveToEndOfLine:";
/* Shift + Home Button */
"$\UF729" = "moveToBeginningOfLineAndModifySelection:";
/* Shift + End Button */
"$\UF72B" = "moveToEndOfLineAndModifySelection:";
/* Ctrl + Home Button */
"^\UF729" = "moveToBeginningOfDocument:";
/* Ctrl + End Button */
"^\UF72B" = "moveToEndOfDocument:";
/* Shift + Ctrl + Home Button */
"$^\UF729" = "moveToBeginningOfDocumentAndModifySelection:";
/* Shift + Ctrl + End Button*/
"$^\UF72B" = "moveToEndOfDocumentAndModifySelection:";
}
3、保存
4、重启
这篇关于让macOS外接键盘Home/End键可用的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!