Still bothered by the Chinese/English toggle key taking up valuable keyboard space on macOS? This tutorial shows you how to use Karabiner-Elements to transform it into a dual-function key: short press for ESC, long press for Control. Say goodbye to wasted key positions!

Modify System Settings Link to heading

First, we need to disable the default Chinese/English toggle key function.

Open System Settings -> Keyboard -> Text Input -> Input Sources -> Edit

Then turn off “Use CapsLock to switch to ABC input source” under All Input Sources

Download and Install Karabiner-Elements Link to heading

First, go to the official website Karabiner-Elements to download

After downloading and installing, open the application

Then enable all permissions in the Setup tab as required, otherwise the key remapping won’t take effect

Configure Karabiner-Elements Link to heading

Sidebar -> Complex Modifications -> Add predefined rule, then a window will open

Select Import more rules from the Internet (Open a web browser) at the top of the window, then a browser will open

Search for Map Caps -> Esc (when alone), L_Ctrl (when chorded)

Select this author, click Import, then when asked if you want to open Karabiner-Elements select Yes, then click + Enable, and enable the newly imported configuration

If it doesn’t exist, copy this:

// https://ke-complex-modifications.pqrs.org/json/torma_Caps_Lock_to_Escape_or_L_Ctrl_when_Chorded.json

{
  "title": "Map Caps -> Esc (when alone), L_Ctrl (when chorded)",
  "maintainers": [
    "alextorma"
  ],
  "rules": [
    {
      "description": "Map Caps -> Esc (when alone), L_Ctrl (when chorded)",
      "manipulators": [
        {
          "description": "Map Caps -> Esc (when alone), L_Ctrl (when chorded)",
          "from": {
            "key_code": "caps_lock",
            "modifiers": {
              "optional": [
                "any"
              ]
            }
          },
          "to": [
            {
              "key_code": "left_control",
              "lazy": true
            }
          ],
          "to_if_alone": [
            {
              "key_code": "escape"
            }
          ],
          "type": "basic"
        }
      ]
    }
  ]
}