wzwwzw
268 天前
我的解决办法是
每当我按下 esc 或者 ctrl +C 的时候,自动将输入法切换为英文
这里给出我的 mac karabiner 的 json
{
"description": "on escape press, send spacebar with control if not in english",
"manipulators": [
{
"conditions": [
{
"input_sources": [
{
"language": "en"
}
],
"type": "input_source_unless"
}
],
"from": {
"key_code": "escape",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "escape"
},
{
"key_code": "spacebar",
"modifiers": [
"left_control"
]
}
],
"type": "basic"
}
]
}
{
"description": "on <ctrl>-c press, send spacebar with control if not in english",
"manipulators": [
{
"conditions": [
{
"input_sources": [
{
"language": "en"
}
],
"type": "input_source_unless"
}
],
"from": {
"key_code": "c",
"modifiers": {
"mandatory": [
"left_control"
]
}
},
"to": [
{
"key_code": "escape"
},
{
"key_code": "spacebar",
"modifiers": [
"left_control"
]
}
],
"type": "basic"
}
]
}