Last active
September 6, 2021 05:02
-
-
Save yetone/b29b79b16fb8fec16dbbdc7f39702352 to your computer and use it in GitHub Desktop.
Karabiner 通过 left shift 来切换中英文
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": "Switch between zh-Hans <-> en (left_shift)", | |
"manipulators": [ | |
{ | |
"conditions": [ | |
{ | |
"input_sources": [ | |
{ | |
"language": "en" | |
} | |
], | |
"type": "input_source_if" | |
} | |
], | |
"from": { | |
"key_code": "left_shift", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_shift" | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"select_input_source": { | |
"language": "zh-Hans" | |
} | |
} | |
], | |
"type": "basic" | |
}, | |
{ | |
"conditions": [ | |
{ | |
"input_sources": [ | |
{ | |
"language": "zh-Hans" | |
} | |
], | |
"type": "input_source_if" | |
} | |
], | |
"from": { | |
"key_code": "left_shift", | |
"modifiers": { | |
"optional": [ | |
"any" | |
] | |
} | |
}, | |
"to": [ | |
{ | |
"key_code": "left_shift" | |
} | |
], | |
"to_if_alone": [ | |
{ | |
"select_input_source": { | |
"language": "en" | |
} | |
} | |
], | |
"type": "basic" | |
} | |
] | |
} |
多谢!不过我这里只能切换输入法图标,但无法真正激活双拼。看官方说明 https://karabiner-elements.pqrs.org/docs/json/complex-modifications-manipulator-definition/to/select-input-source/ select_input_source
对于中文输入法可能有问题,改成直接发送切换输入法的快捷键就可以了。
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
有bug 啊 能解决下不 ,偶然失效 , 是因为shift 大小写的原因