macOS Keyboard and Mouse Key Configuration

macOS Keyboard and Mouse Key Configuration

1. Installation Environment

The configuration environment is as follows.

  • macOS 10.14.6 Mojave
  • Dell KM717 Keyboard, Mouse

2. Karabiner-Elements Installation

Install Karabiner-Elements to change keys.

3. Karabiner-Elements Complex Modification Rules File Creation

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{
  "title": "Change language with right command and lang1",
  "rules": [
    {
      "description": "Change language with right command and lang1",
      "manipulators": [
        {
          "type": "basic",
          "from": {
            "key-code": "right-command"
          },
          "to": [
            {
              "key-code": "caps-lock"
            }
          ]
        },
        {
          "type": "basic",
          "from": {
            "key-code": "lang1"
          },
          "to": [
            {
              "key-code": "caps-lock"
            }
          ]
        }
      ]
    }
  ]
}
[File 1] ~/.config/karabiner/assets/complex-modifications/lang.json

Create [File 1]. [File 1] sets the Mac keyboard’s right Command key and Windows keyboard’s language key as Korean/English toggle keys.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{
  "title": "Switch space with mouse buttons 3,4",
  "rules": [
    {
      "description": "Maps button 3 to right space switch, 4 to left space switch",
      "manipulators": [
        {
          "type": "basic",
          "from": {
            "pointing-button": "button4"
          },
          "to": [
            {
              "key-code": "left-arrow",
              "modifiers": "left-control"
            }
          ]
        },
        {
          "type": "basic",
          "from": {
            "pointing-button": "button3"
          },
          "to": [
            {
              "key-code": "right-arrow",
              "modifiers": "left-control"
            }
          ]
        }
      ]
    }
  ]
}
[File 2] ~/.config/karabiner/assets/complex-modifications/mouse-space.json

Create [File 2]. [File 2] configures Windows mouse wheel scroll key and side key to change macOS workspace.

4. Karabiner-Elements Complex Modification Rules Configuration

[Figure 1] Before Complex Modification Rules Configuration

[Figure 1] Before Complex Modification Rules Configuration

[Figure 2] After Complex Modification Rules Configuration

[Figure 2] After Complex Modification Rules Configuration

Apply the Complex Modification Rules from [File 1] and [File 2] in Karabiner-Elements. Click the “Add rule” button in [Figure 1] to configure.