Last active
September 8, 2024 16:27
-
-
Save h2m730131/3deae79321d10a1617da5bd30cddecb0 to your computer and use it in GitHub Desktop.
Remap the Keyboard in macOS: Karabiner-Elements
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"profiles": [ | |
{ | |
"complex_modifications": { | |
"rules": [ | |
{ | |
"description": "⌃-J to switch between english and 倉頡", | |
"manipulators": [ | |
{ | |
"conditions": [ | |
{ | |
"input_sources": [ | |
{ | |
"input_mode_id": "com.apple.inputmethod.TCIM.Cangjie", | |
"input_source_id": "com.apple.inputmethod.TCIM.Cangjie", | |
"language": "zh-Hant" | |
} | |
], | |
"type": "input_source_if" | |
} | |
], | |
"from": { | |
"key_code": "j", | |
"modifiers": { | |
"mandatory": "left_control", | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"select_input_source": { | |
"input_source_id": "com.apple.keylayout.ABC", | |
"language": "en" | |
} | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"conditions": [ | |
{ | |
"input_sources": [ | |
{ | |
"input_source_id": "com.apple.keylayout.ABC", | |
"language": "en" | |
} | |
], | |
"type": "input_source_if" | |
} | |
], | |
"from": { | |
"key_code": "j", | |
"modifiers": { | |
"mandatory": "left_control", | |
"optional": ["any"] | |
} | |
}, | |
"to": [ | |
{ | |
"select_input_source": { | |
"input_mode_id": "com.apple.inputmethod.TCIM.Cangjie", | |
"input_source_id": "com.apple.inputmethod.TCIM.Cangjie", | |
"language": "zh-Hant" | |
} | |
} | |
], | |
"type": "basic" | |
} | |
] | |
}, | |
{ | |
"description": "Change left_option+hjkl to arrow keys", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "h", | |
"modifiers": { | |
"mandatory": ["left_option"], | |
"optional": ["any"] | |
} | |
}, | |
"to": [{ "key_code": "left_arrow" }], | |
"type": "basic" | |
}, | |
{ | |
"from": { | |
"key_code": "j", | |
"modifiers": { | |
"mandatory": ["left_option"], | |
"optional": ["any"] | |
} | |
}, | |
"to": [{ "key_code": "down_arrow" }], | |
"type": "basic" | |
}, | |
{ | |
"from": { | |
"key_code": "k", | |
"modifiers": { | |
"mandatory": ["left_option"], | |
"optional": ["any"] | |
} | |
}, | |
"to": [{ "key_code": "up_arrow" }], | |
"type": "basic" | |
}, | |
{ | |
"from": { | |
"key_code": "l", | |
"modifiers": { | |
"mandatory": ["left_option"], | |
"optional": ["any"] | |
} | |
}, | |
"to": [{ "key_code": "right_arrow" }], | |
"type": "basic" | |
} | |
] | |
} | |
] | |
}, | |
"devices": [ | |
{ | |
"identifiers": { | |
"is_keyboard": true, | |
"product_id": 34050, | |
"vendor_id": 2652 | |
}, | |
"simple_modifications": [ | |
{ | |
"from": { "key_code": "caps_lock" }, | |
"to": [{ "key_code": "escape" }] | |
} | |
] | |
} | |
], | |
"name": "Default profile", | |
"selected": true | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment