@
JingW karabiner 支持 condition ,在按下左/右 Shift 后,检测当前输入法是否为特定语言,是就输入一个输入法切换的快捷键,切换到另一个输入法
配置示例:
```json
[
{
"description": "(Left_shift) Left shift to switch input method to English",
"manipulators": [
{
"conditions": [
{
"input_sources": [
{
"language": "en"
}
],
"type": "input_source_unless"
}
],
"from": {
"key_code": "left_shift",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "right_shift"
}
],
"to_if_alone": [
{
"key_code": "0",
"modifiers": [
"left_command",
"left_shift",
"left_control",
"left_option"
]
}
],
"type": "basic"
}
]
},
{
"description": "(Right_shift) Right shift to switch input method to non-en",
"manipulators": [
{
"conditions": [
{
"input_sources": [
{
"language": "en"
}
],
"type": "input_source_if"
}
],
"from": {
"key_code": "right_shift",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "right_shift"
}
],
"to_if_alone": [
{
"key_code": "0",
"modifiers": [
"left_command",
"left_shift",
"left_control",
"left_option"
]
}
],
"type": "basic"
}
]
}
]
```