Skip to main content

Mapping keys to set different input languages on macOS

Prerequisiteโ€‹

Final Goalโ€‹

  • Press Left Command to set Mac's input method to English.
  • Press Right Command to set Mac's input method to Korean.
  • Any other shortcut combinations would perform as usual.

Instructionsโ€‹

  • Go to ~/.config/karabiner/assets/complex_modifications. You can click Command+Shift+G within Finder to open a goto window.
  • Create a JSON file like the following here (open any text editor and save it as filename.json).
  • Go to Karabiner-Elements.app โ†’ Complex Modifications and press add rules.
  • Click the rules that you want to enable. The above text file will show under Multilingual Input Methods.
{
"title": "Multilingual Input Methods",
"rules": [
{
"description": "R Command to ํ•œ๊ธ€",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "right_command",
"modifiers": { "optional": ["any"] }
},
"to": [
{ "key_code": "right_command", "lazy": true }
],
"to_if_alone": [
{
"select_input_source": { "language": "^ko$" }
}
]
}
]
},
{
"description": "L Command to English",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_command",
"modifiers": { "optional": ["any"] }
},
"to": [
{ "key_code": "left_command", "lazy": true }
],
"to_if_alone": [
{
"select_input_source": { "language": "^en$" }
}
]
}
]
}
]
}

Configuring more languagesโ€‹

Update Mar 7th, 2022โ€‹