Skip to content

Instantly share code, notes, and snippets.

@ymnder
Last active March 3, 2021 23:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ymnder/b75dad6736760111af4c83768b21ea44 to your computer and use it in GitHub Desktop.
Save ymnder/b75dad6736760111af4c83768b21ea44 to your computer and use it in GitHub Desktop.
Karabiner-ElementsでLeft ControlかCaps Lockを押したら中国語入力に切り替える
{
"title": "switch another input source",
"rules": [
{
"description": "switch to a Chinese input source with left_ctrl",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_control"
},
"to": [
{
"key_code": "left_control",
"lazy": true
}
],
"to_if_alone": [
{
"select_input_source": {
"language": "zh-Hans"
}
}
],
"to_if_held_down": [
{
"key_code": "left_control"
}
],
"parameters": {
"basic.to_if_alone_timeout_milliseconds": 300
}
}
]
},
{
"description": "switch to a Chinese input source with caps_lock",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "caps_lock"
},
"to": [
{
"key_code": "caps_lock",
"lazy": true
}
],
"to_if_alone": [
{
"select_input_source": {
"language": "zh-Hans"
}
}
],
"to_if_held_down": [
{
"key_code": "caps_lock"
}
],
"parameters": {
"basic.to_if_alone_timeout_milliseconds": 300
}
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment