본문 바로가기

꿀팁

해피해킹 키배열 맥북 키보드처럼 사용하기(feat. Karabiner-Elements)

해피해킹 무각을 샀다.

너무 영롱한데 키배열이.... 은근 불편한 면이 있다.

그래서 다음 3가지를 바꿨다.

1. Control 키를 한번 누르면 한/영 전환이 되지만, 그냥 다른 키와 누르면 Control 처럼 동작 (Ctrl+C 를 종종 써야하니깐..)

2. Esc를 한번 누르면 Esc로 동작하지만, Esc를 Shift나 Alt키와 누르면 각각 ~, `로 동작하게 하기

3. ~`가 적혀있는 우측 맨 위 키는 한 번 누르면 Delete 키로 사용되게 하기.

 

3번 + 1,2번을 하기 위해 

 

- 먼저 Simple modifications -> hhkb 키보드에서 다음 2가지를 추가해 준다.

 

다음으로 1, 2번을 하기 위해

~/.config/karabiner/karabiner.json 파일을 열고

    "profiles": [
        {
            "complex_modifications": {
                "rules": [ ]
                }
        }
    ]

부분에서 "rules" : [ ] 의 대괄호 안에다가 

{
  "description": "Left Shift + Escape -> ~, Option + Escape -> `",
  "manipulators": [
    {
      "type": "basic",
      "from": {
        "key_code": "escape",
        "modifiers": {
          "mandatory": ["left_shift"]
        }
      },
      "to": [
        {
          "key_code": "grave_accent_and_tilde",
          "modifiers": ["left_shift"]
        }
      ]
    },
    {
      "type": "basic",
      "from": {
        "key_code": "escape",
        "modifiers": {
          "mandatory": ["left_option"]
        }
      },
      "to": [
        {
          "key_code": "grave_accent_and_tilde",
          "modifiers": ["left_option"]
        }
      ]
    }
  ]
},
{
    "description": "long press caps_lock to left_ctrl",
    "manipulators": [
        {
            "from": {
                "key_code": "caps_lock",
                "modifiers": {
                    "optional": [
                        "any"
                    ]
                }
            },
            "to": [
                {
                    "key_code": "left_control"
                }
            ],
            "to_if_alone": [
                {
                    "key_code": "caps_lock"
                }
            ],
            "type": "basic"
        }
    ]
}

을 넣고 저장하면 1,2번도 적용된다.

 

위와 같이 설정해주면 된다.

그럼 키보드를 이렇게 쓸 수 있다!!

다들 즐거운 해피해킹 라이프 되시길 ㅎㅎ