背景
我一直对于 MacOS 使用大小写锁定键当作中英文切换按键感到十分的难绷,而更要命的是,这个大小写锁定切换输入法还有“苹果愚蠢的小聪明:防误触延时”,使得其切换体验更加雪上加霜。
以及随着搜狗输入法 MAC 版已经炸裂到广告满天飞(谁说 MAC 没有流氓软件的?),微信输入法 MAC 版太丑而且 BUG 也不少,我又回归了原生“干净”的输入法。
配置
为了让原生输入法(以及切换)稍微能“正常”使用,Karabiner-Elements 就变成了必须要安装的软件了。通过高级配置,让你的 Shift 独立按下时,自动映射到 Ctrl + Space 组合键,从而达到切换输入法的目的。
值得注意的是,所有新接入的外接键盘,都需要在 Karabiner-Elements 稍微配置一下。在通过 Karabiner-Elements 管理外接键盘后,系统设置里的修饰键会不起作用,需要在 Karabiner-Elements 中重新配置修饰键。
基于此文章,给出两种配置文件:
右 Shift 切换策略:
1{
2 "description": "Change R_Shift to control + space to switch EN/ZH",
3 "manipulators": [
4 {
5 "type": "basic",
6 "from": {
7 "key_code": "right_shift",
8 "modifiers": {
9 "optional": ["any"]
10 }
11 },
12 "to": [
13 {
14 "key_code": "right_shift",
15 "lazy": true
16 }
17 ],
18 "to_if_alone": [
19 {
20 "key_code": "spacebar",
21 "modifiers": ["left_control"]
22 }
23 ]
24 }
25 ]
26}
左 Shift 切换策略:
1{
2 "description": "Change L_Shift to control + space to switch EN/ZH",
3 "manipulators": [
4 {
5 "type": "basic",
6 "from": {
7 "key_code": "left_shift",
8 "modifiers": {
9 "optional": ["any"]
10 }
11 },
12 "to": [
13 {
14 "key_code": "left_shift",
15 "lazy": true
16 }
17 ],
18 "to_if_alone": [
19 {
20 "key_code": "spacebar",
21 "modifiers": ["left_control"]
22 }
23 ]
24 }
25 ]
26}
版权声明:本文遵循 CC BY-SA 4.0 版权协议,转载请附上原文出处链接和本声明。
Copyright statement: This article follows the CC BY-SA 4.0 copyright agreement. For reprinting, please attach the original source link and this statement.