Created
September 27, 2024 16:13
-
-
Save cdpath/1dd129dbf4bbfcbc32bb1db27aec7a93 to your computer and use it in GitHub Desktop.
Karabiner-Elements Config: shift for us shift-shift for rime
This file contains 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
{ | |
"description": "Use left Shift for English/Chinese input switching", | |
"manipulators": [ | |
{ | |
"conditions": [ | |
{ | |
"name": "left_shift_pressed", | |
"type": "variable_if", | |
"value": 1 | |
} | |
], | |
"from": { | |
"key_code": "left_shift", | |
"modifiers": { "optional": ["any"] } | |
}, | |
"to": [{ "select_input_source": { "input_mode_id": "im.rime.inputmethod.Squirrel.Hans" } }], | |
"type": "basic" | |
}, | |
{ | |
"from": { | |
"key_code": "left_shift", | |
"modifiers": { "optional": ["any"] } | |
}, | |
"parameters": { | |
"basic.to_delayed_action_delay_milliseconds": 200, | |
"basic.to_if_alone_timeout_milliseconds": 200 | |
}, | |
"to": [ | |
{ | |
"set_variable": { | |
"name": "left_shift_pressed", | |
"value": 1 | |
} | |
}, | |
{ "key_code": "left_shift" } | |
], | |
"to_delayed_action": { | |
"to_if_canceled": [ | |
{ | |
"set_variable": { | |
"name": "left_shift_pressed", | |
"value": 0 | |
} | |
} | |
], | |
"to_if_invoked": [ | |
{ | |
"set_variable": { | |
"name": "left_shift_pressed", | |
"value": 0 | |
} | |
} | |
] | |
}, | |
"to_if_alone": [{ "select_input_source": { "language": "en" } }], | |
"type": "basic" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment