通过第三方软件修改 MacOS 的键盘映射
由于文本编辑时大量使用word level的左移、右移,其中:
OSX的单词级左右移为option + Left/Right Arrow,整行级左右移为command + Left/Right Arrow
单词级移动与进行编辑常用的command不同键位,因此尝试交换二者功能
-  
由于 command 键在OSX下的其他重要作用,不方便直接将 option 与 command 进行键位互换;需要考虑将组合键进行替换,即:
- (单词级移动)command + Left / Right Arrow 的功能与 option + Left/Right Arrow 替换
 - (单词级删除)command + Left / Right Arrow 的功能与 option + Left/Right Arrow 替换
 
 -  
内置的键盘快捷键映射修改只支持单键位交换,需要借助第三方工具:Karabiner-Elements
- Karabiner-Elements: site
 - 脚本预设:site
 
 -  
具体流程记录
 -  
在官方网址下载 Karabiner-Elements 并完成安装、按照提示在系统设置中设置权限
-  
打开
Karabiner-Elements,在左侧侧边栏中选中Complex Modifications-  
点击
Add rule,并点击Import more rules from the Internet -  
依次搜索并点击对应词条右侧的
Import,并在唤醒的Karabiner-Elements中点击Import# 单词级移动 Exchange command + arrow keys with option + arrow keys# 单词级删除 Exchange Command+Backward-Delete (delete current line) -  
点击
Add rule -  
找到新添加的两个规则,点击
Enable激活 
 -  
 
 -  
 -  
最终
Karabiner-Elements界面显示如图则成功替换

 
2023-06-12 karlzpsong



















