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"
                        }
                    ]
                }
            ]
相關文章
相關標籤/搜索