Karabiner-Elements 将按键映射到组合键

Ron*_*adi 7 macos karabiner macos-mojave

我是卡拉宾纳的新手。据我了解,该程序可以更改键盘映射。我理解并能够使用“简单修改”“From key”“To key”。

但是,如果我想将 Home 按钮重新映射到 CTRL+LEFT_ARROW,我该怎么做呢?

目前在 MacOs Mojave 上

Ron*_*adi 9

打开~/.config/karabiner/karabiner.json 编辑该文件,从根级别>“配置文件”>“complex_modifications”>在参数:{...}下,添加:

"rules": [
                    {
                        "description": "Home to Control Left",
                        "manipulators": [
                            {
                                "from": {
                                    "key_code": "home"
                                },
                                "to": [
                                    {
                                        "key_code": "left_arrow",
                                        "modifiers": "control"
                                    }
                                ],
                                "type": "basic"
                            }
                        ]
                    },
                    {
                        "description": "End to Control Right",
                        "manipulators": [
                            {
                                "from": {
                                    "key_code": "end"
                                },
                                "to": [
                                    {
                                        "key_code": "right_arrow",
                                        "modifiers": "control"
                                    }
                                ],
                                "type": "basic"
                            }
                        ]
                    }
                ]
Run Code Online (Sandbox Code Playgroud)

请注意,这将映射:

  • 按 CTRL+左键
  • END 至 CTRL+RIGHT