背景
我一直对于 MacOS 使用大小写锁定键当作中英文切换按键感到十分的难绷,而更要命的是,这个大小写锁定切换输入法还有“苹果愚蠢的小聪明:防误触延时”,使得其切换体验更加雪上加霜。
以及随着搜狗输入法 MAC 版已经炸裂到广告满天飞(谁说 MAC 没有流氓软件的?),微信输入法 MAC 版太丑而且 BUG 也不少,我又回归了原生“干净”的输入法。
配置
为了让原生输入法(以及切换)稍微能“正常”使用,Karabiner-Elements 就变成了必须要安装的软件了。通过高级配置,让你的 Shift 独立按下时,自动映射到 Ctrl + Space 组合键,从而达到切换输入法的目的。
值得注意的是,所有新接入的外接键盘,都需要在 Karabiner-Elements 稍微配置一下。在通过 Karabiner-Elements 管理外接键盘后,系统设置里的修饰键会不起作用,需要在 Karabiner-Elements 中重新配置修饰键。
基于此文章,给出两种配置文件:
右 Shift 切换策略:
{
"description": "Change R_Shift to control + space to switch EN/ZH",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "right_shift",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "right_shift",
"lazy": true
}
],
"to_if_alone": [
{
"key_code": "spacebar",
"modifiers": ["left_control"]
}
]
}
]
}
左 Shift 切换策略:
{
"description": "Change L_Shift to control + space to switch EN/ZH",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_shift",
"modifiers": {
"optional": ["any"]
}
},
"to": [
{
"key_code": "left_shift",
"lazy": true
}
],
"to_if_alone": [
{
"key_code": "spacebar",
"modifiers": ["left_control"]
}
]
}
]
}