mac 下使用 ikbcG87 及使用 karabiner 改大小写键

前言

  • 一直使用 mac ,对于机械键盘还处于刚入坑阶段,做为小白仍是选择可以兼容 mac 的机械键盘,因而选择了 ikbcG87 “双子座”

1.使用 ikbc G87 mac 模式下

  • 切换
    • G87 默认是 windows 模式,须要同时按下 Fn+Pause 键,切换到 mac 模式,此时 Pause 键的灯会常亮。若是要在 mac 模式下关闭 Pause 键的常亮灯,须要同时按下 Fn+Esc 键。(在 mac 模式下,再单击一下 Pause 键,就能够切换回 windows 模式)git

  • 在 mac 模式下 f一、f二、f3 默认正常使用
  • f4 须要设置
    • Launchpad 键默认是不起做用的,须要在“系统偏好设置—键盘—快捷键—显示Launchpad”中设置一下,而后就能够使用 f4 这个按键了 (绑定的是 ^L 组合键)
  • 设置好 mac 模式,能够使用 Fn+End 记忆当前使用模式,下次插上键盘时就默认是 mac 模式,不过 Pause 键会一直亮着,须要手动,按下 Fn+Esc 键

2.大小写键改成 ctrl 键

  • 问题:使用 mac 自带的改键映射后,f三、f4 就没有效果了
  • 方法:使用 karabiner 软件,使用 complex_modifications rules
    • https://pqrs.org/osx/karabiner/complex_modifications/#modifier_keys
    • 通过筛选测试 Change caps_lock to control if pressed with other keys, to escape if pressed alone. 这个规则能够利用,它默认是按了 caps_lock 和其余组合键的时候就把 caps_lock 改成 control,仅仅单击 caps_lock 的时候就改成 esc 键,而咱们的目标就是单击时是 caps_lock,组合的时候是 control
    • 修改目录及内容
      • 可参考 https://github.com/pqrs-org/KE-complex_modifications 上的介绍来修改
      • 第一个修改github

        1.路径
        |--- ~/.config
            |--- karabiner
                |--- assets
                    |--- complex_modifications
                        |--- 1510932793.json
        2.内容:找到这条规则,将最后的 escape 改成 caps_lock
        {
            "description": "Change caps_lock to control if pressed with other keys, to escape if pressed alone.",
            "manipulators": [
                {
                "type": "basic",
                "from": {
                    "key_code": "caps_lock",
                    "modifiers": {
                    "optional": [
                        "any"
                    ]
                    }
                },
                "to": [
                    {
                    "key_code": "left_control"
                    }
                ],
                "to_if_alone": [
                    {
                    "key_code": "caps_lock"
                    }
                ]
                }
            ]
        }
      • 第二个修改(主要生效的文件)json

        1.路径
        |--- ~/.config
            |--- karabiner
                |--- karabiner.json
        2.内容:找到这条规则,将最后的 escape 改成 caps_lock
        "rules": [
                {
                    "description": "Change caps_lock to control if pressed with other keys, to escape if pressed alone.",
                    "manipulators": [
                        {
                            "from": {
                                "key_code": "caps_lock",
                                "modifiers": {
                                    "optional": [
                                        "any"
                                    ]
                                }
                            },
                            "to": [
                                {
                                    "key_code": "left_control"
                                }
                            ],
                            "to_if_alone": [
                                {
                                    "key_code": "caps_lock"
                                }
                            ],
                            "type": "basic"
                        }
                    ]
                }
            ]
相关文章
相关标签/搜索