> ## Content Index
> Fetch the complete content index at: https://sudormrf.run/llms.txt
> Use this file to discover other available public pages before exploring further.

# macOS에서 키보드 re-mapping
- URL: https://sudormrf.run/2022/01/10/macos-keyboard-remapping/
- Published: 2022-01-10T10:19:34.000Z
- Updated: 2022-01-10T10:20:42.000Z
- Author: Junho Cho
- Tags: macOS, #Import 2026-10-24 03:36

# 나의 macOS 키보드 리매핑 이유

1. `esc` 키가 너무 멀다.  
  - 흔히 쓰이지 않는 `capslock`을 대신 썼으며 좋겠다.
2. 한영키가 윈도우 키보드 같이 같은 위치에 있으면 좋겠음.  
  - 외부 키보드는 `right_alt` 버튼, 내장 키보드는 `right_cmd`를 한영키로 사용하겠다.
3. 외부 키보드 연결시 window 키는 `cmd`, alt키는 `option`키가 되어 본래 애플키보드에서 쓰는 게 반대로 되는 것이 불편.
4. 마우스의 측면 버튼 (button4,5) 사용시 인터넷 브라우징등에서 앞으로/뒤로 가기 키로 설정하였으면함.  
  - 크롬에서는 측면 버튼으로 앞/뒤로가기 되는데, 사파리,노션에서는 안된다. `cmd [ 또는 ]`키를 사용해야 함.

이를 위해 [Karabiner](https://karabiner-elements.pqrs.org/?ref=sudormrf.run)를 설치한다.  
그리고 외부키보드와 애플 내장 키보드를 다음과 같이 설정.

- 외부 키보드  
![-----------2022-01-10------6.45.12](https://sudormrf.run/content/images/2022/01/-----------2022-01-10------6.45.12.png)
- 애플 내장 키보드  
![-----------2022-01-10------7.10.54](https://sudormrf.run/content/images/2022/01/-----------2022-01-10------7.10.54.png)

이것으로 1,3 번은 해결.  
2번의 한영키 설정은 외부 키보드에서 스페이스바 옆의 alt키인 `right_option`을 흔히 사용하지 않을 키인 `f13`으로, 애플키보드의 `right_cmd`를 `f13`으로 변경한다.  
그리고 시스템환경설정>키보드에서 입력소스 단축키를 다음과 같이 `F13`으로 변경한다.

![-----------2022-01-10------6.42.14](https://sudormrf.run/content/images/2022/01/-----------2022-01-10------6.42.14.png)

마지막으로 마우스 측면 버튼을 설정해주기 나의 경우에는 일단 USB Reciever (Logitech) 타입을 마우스로 선택.  
![](https://s3.us-west-2.amazonaws.com/secure.notion-static.com/6206ad96-7170-4374-8b4e-8f3be56c2f5f/Untitled.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIAT73L2G45EIPT3X45%2F20220110%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20220110T094936Z&X-Amz-Expires=86400&X-Amz-Signature=9b505b627076b4efe4aa4f8e88b66577fe694f8cc557706c9d2ae4e3851ea79d&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22Untitled.png%22&x-id=GetObject)

그리고 target device의 USB Reciever에서 일단 button4를 추가하고, `~/.config/karabiner/karabiner.json` 를 수정해준다.

[https://github.com/pqrs-org/Karabiner-Elements/issues/1241](https://github.com/pqrs-org/Karabiner-Elements/issues/1241?ref=sudormrf.run) 을 참고하여 `karabiner.json` script에서 button4가 설정된 device 부분을 찾아가서 다음으로 수정  
![-----------2022-01-10------6.53.46](https://sudormrf.run/content/images/2022/01/-----------2022-01-10------6.53.46.png)

```json
"simple_modifications": [
{
    "from":
    {
        "pointing_button": "button4"
    },
    "to":
    {
        "key_code": "open_bracket",
        "modifiers": [
            "left_command"
        ]
    }
},
{
    "from":
    {
        "pointing_button": "button5"
    },
    "to":
    {
        "key_code": "close_bracket",
        "modifiers": [
            "left_command"
        ]
    }
}]

```

그러면 karabiner에서 확인해보면 다음과 같이 되어있음.

![](https://s3.us-west-2.amazonaws.com/secure.notion-static.com/1ca3c8fc-ee1e-4a0b-a2ed-d793d72892e4/Untitled.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIAT73L2G45EIPT3X45%2F20220110%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Date=20220110T094847Z&X-Amz-Expires=86400&X-Amz-Signature=163e82649ca8c4b01bb01820cb423b7737247ae8c070017633aa24a4bd2f87d1&X-Amz-SignedHeaders=host&response-content-disposition=filename%20%3D%22Untitled.png%22&x-id=GetObject)

즉, button4를 `cmd + [` 키로, button5를 `cmd + ]` 설정.

그 외에 binding 하고 싶은 키는 Karabiner 설치 시 설치되는 Karabiner-EventViewer 에서 물리 버튼을 입력하여 확인한다.

![-----------2022-01-10------7.05.14](https://sudormrf.run/content/images/2022/01/-----------2022-01-10------7.05.14.png)