New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Workaround for CJKV input sources switching issue #1602
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I'm experiencing the same issue.
Switching from |
Hi @oklahomer, I don't think this issue will be fixed in the near future as it's a long-existing macOS bug and Kawa's workaround is not fully reliable. I have similar need as you to use command keys for switching between input sources. My current workaround is:
{
"description": "Tap Command_L (⌘) → switch input source to English (F18)",
"manipulators": [
{
"conditions": [
{
"input_sources": [
{
"language": "en"
}
],
"type": "input_source_unless"
}
],
"from": {
"key_code": "left_command",
"modifiers": {
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "left_command",
"lazy": true
}
],
"to_if_alone": [
{
"key_code": "f18"
}
],
"to_if_held_down": [
{
"key_code": "left_command"
}
],
"type": "basic"
}
]
},
{
"description": "Tap Command_R (⌘) → switch input source to Chinese (F18)",
"manipulators": [
{
"conditions": [
{
"input_sources": [
{
"language": "zh-Hans"
}
],
"type": "input_source_unless"
}
],
"from": {
"key_code": "right_command",
"modifiers": {
"optional": [
"caps_lock"
]
}
},
"to": [
{
"key_code": "right_command",
"lazy": true
}
],
"to_if_alone": [
{
"key_code": "f18"
}
],
"to_if_held_down": [
{
"key_code": "right_command"
}
],
"type": "basic"
}
]
}, It only works if you only use two input sources. Despite that, this workaround is quite reliable as I've been using it for a while. Hope this may help. |
emacs-mac don't have such a problem |
Karabiner-Elements and emacs use |
Anyone knows any workaround for more than two input source, in particular switching between CJKV? @gxfxyz ‘s solution works only when you use two. |
I also met this problem last night. Luckily I find a simple solution today. Sample above shows switching between 4 input methods(简体中文双拼/简体中文五笔/繁体中文双拼/英文切换.) |
It seems just a "refresh" problem. I find a simple refreshing solution by so called "Chinese/English Switch" printed on my CapsLock Key after switching input method. |
As you know, the
TISSelectInputSource
input source switching API still has the bug that sometimes it will fail to switch some CJKV (Chinese, Japanese, Korean, Vietnamese) input sources (only menubar icon changed).Kawa has implemented a workaround to solve this issue:
Select the previous input source
shortcutI've tested Kawa, and it works great without the issue.
Could you consider adapt this workaround to Karabiner-Elements? It would be really helpful to many CJKV users.
Thank you so much for your awesome project!
Related issues:
References:
The text was updated successfully, but these errors were encountered: