Mac OS 修改默认复制、粘贴等快捷键

༺小ʚɞ寞༻ Mac评论32,877字数 2661阅读8分52秒阅读模式

之前我一直用Windows或Linux,后来使用Mac OS,感觉还是有很多不习惯的地方。特别是一些常用的快捷键,比如复制、粘贴等快捷键,在Windows下是使用ctrl键,而在Mac OS下是使用command键。而且我还使用Windows虚拟机,经常需要来回切换快捷键,使用很不习惯。最近网上搜索到一个软件可以修改快捷键映射,完美解决这个问题。现记录一下:

1.下载并安装一个软件 Karabiner-Elements,官方地址: https://pqrs.org/osx/karabiner/

2.软件打开的界面如下:

Mac OS 修改默认复制、粘贴等快捷键

3.点击 “Complex modifications”,出现的界面如下:

Mac OS 修改默认复制、粘贴等快捷键

4.点击 “Add rule”,出现界面如下:

Mac OS 修改默认复制、粘贴等快捷键

5.点击 “import more rules from the internet”,会打开一个页面

Mac OS 修改默认复制、粘贴等快捷键

6.点击页面的“import” 导入规则,导入成功后,可以看到新增的如下两条规则:

Mac OS 修改默认复制、粘贴等快捷键

7.点击第一条规则的 “Enable” ,使用这条规则。
这条规则会立即将键盘上左边的 ctrl + 字母键 映射为 command + 字母键。大功告成!

如果要去掉多余的映射关系,则直接修改

~/.config/karabiner/assets/complex_modifications/1575427520.json

这个文件,把不需要的映射关系去掉,只保留常用的即可,如下所示:

{
    "title": "Change control + letter keys to command + letter keys",
    "rules": [
         {
            "description": "Change left_control + letter to left_command + letter",
            "manipulators": [
                {
                    "type": "basic",
                    "from": {
                        "key_code": "a",
                        "modifiers": {
                            "mandatory": ["left_control"],
                            "optional": ["any"]
                        }
                    },
                    "to": [
                        {
                          "key_code": "a",
                          "modifiers": [
                            "left_command"
                          ]
                        } 
                    ]
                },
                {
                    "type": "basic",
                    "from": {
                        "key_code": "b",
                        "modifiers": {
                            "mandatory": ["left_control"],
                            "optional": ["any"]
                        }
                    },
                    "to": [
                        {
                          "key_code": "b",
                          "modifiers": [
                            "left_command"
                          ]
                        } 
                    ]
                },
                {
                    "type": "basic",
                    "from": {
                        "key_code": "c",
                        "modifiers": {
                            "mandatory": ["left_control"],
                            "optional": ["any"]
                        }
                    },
                    "to": [
                        {
                          "key_code": "c",
                          "modifiers": [
                            "left_command"
                          ]
                        } 
                    ]
                },
                {
                    "type": "basic",
                    "from": {
                        "key_code": "f",
                        "modifiers": {
                            "mandatory": ["left_control"],
                            "optional": ["any"]
                        }
                    },
                    "to": [
                        {
                          "key_code": "f",
                          "modifiers": [
                            "left_command"
                          ]
                        } 
                    ]
                },
                {
                    "type": "basic",
                    "from": {
                        "key_code": "h",
                        "modifiers": {
                            "mandatory": ["left_control"],
                            "optional": ["any"]
                        }
                    },
                    "to": [
                        {
                          "key_code": "h",
                          "modifiers": [
                            "left_command"
                          ]
                        } 
                    ]
                },
                {
                    "type": "basic",
                    "from": {
                        "key_code": "n",
                        "modifiers": {
                            "mandatory": ["left_control"],
                            "optional": ["any"]
                        }
                    },
                    "to": [
                        {
                          "key_code": "n",
                          "modifiers": [
                            "left_command"
                          ]
                        } 
                    ]
                },

                {
                    "type": "basic",
                    "from": {
                        "key_code": "o",
                        "modifiers": {
                            "mandatory": ["left_control"],
                            "optional": ["any"]
                        }
                    },
                    "to": [
                        {
                          "key_code": "o",
                          "modifiers": [
                            "left_command"
                          ]
                        } 
                    ]
                },
                {
                    "type": "basic",
                    "from": {
                        "key_code": "s",
                        "modifiers": {
                            "mandatory": ["left_control"],
                            "optional": ["any"]
                        }
                    },
                    "to": [
                        {
                          "key_code": "s",
                          "modifiers": [
                            "left_command"
                          ]
                        } 
                    ]
                },

                {
                    "type": "basic",
                    "from": {
                        "key_code": "v",
                        "modifiers": {
                            "mandatory": ["left_control"],
                            "optional": ["any"]
                        }
                    },
                    "to": [
                        {
                          "key_code": "v",
                          "modifiers": [
                            "left_command"
                          ]
                        } 
                    ]
                },
                {
                    "type": "basic",
                    "from": {
                        "key_code": "x",
                        "modifiers": {
                            "mandatory": ["left_control"],
                            "optional": ["any"]
                        }
                    },
                    "to": [
                        {
                          "key_code": "x",
                          "modifiers": [
                            "left_command"
                          ]
                        } 
                    ]
                },
                {
                    "type": "basic",
                    "from": {
                        "key_code": "y",
                        "modifiers": {
                            "mandatory": ["left_control"],
                            "optional": ["any"]
                        }
                    },
                    "to": [
                        {
                          "key_code": "y",
                          "modifiers": [
                            "left_command"
                          ]
                        } 
                    ]
                },
                {
                    "type": "basic",
                    "from": {
                        "key_code": "z",
                        "modifiers": {
                            "mandatory": ["left_control"],
                            "optional": ["any"]
                        }
                    },
                    "to": [
                        {
                          "key_code": "z",
                          "modifiers": [
                            "left_command"
                          ]
                        } 
                    ]
                }
            ]
		}
    ]
}

如果要取消键的映射,则删除这条规则即可。

这个软件的功能非常强大,可以定制键盘所有的按键功能,根据需要可以参考官方文档深入研究。

weinxin
LuckTang's Blog 站长语录
LuckTang's Blog,欢迎各位来访!这是我的QQ,扫一扫,加好友。大家一起交流博客建站技术,分享前沿资讯!
Mac最后更新:2020-8-19
黑苹果驱动优化教程 Mac

黑苹果驱动优化教程

安装完 MacOS 后并不能立刻使用,还需要进行一系列驱动安装和修改过程才能使系统实现接近于原生的体验。 注意:不推荐使用 MultiBeast 软件来安装驱动。 启动 / 引导界面优化 准备软件 请...
macOS打开原生的NTFS读写功能 Mac

macOS打开原生的NTFS读写功能

Mac本身实际上是支持原生的NTFS读写的,只不过这一功能被隐藏了,但是可以手动打开,这比第三方的的工具要安全得多,有时第三方工具可能会发生整个NTFS分区数据丢失的情况,下面是打开MAC原生NTFS...
匿名

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定