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

前言

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

1.使用 ikbc G87 mac 模式下

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

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

2.大小写键改为 ctrl 键

  • 问题:使用 mac 自带的改键映射后,f3、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 上的介绍来修改

      • 第一个修改

        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"
                    }
                ]
                }
            ]
        }
        
        
      • 第二个修改(主要生效的文件)

        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"
                        }
                    ]
                }
            ]
        
posted @ 2017-12-25 10:48  HOWIE-CH  阅读(4455)  评论(0编辑  收藏  举报