在Windows上,可以用Shift来切换中英文输入法,在Mac上,使用的是Caps Lock,由于日常要用到这两种操作系统,想统一一下。使left_shift 切换中英文,长按保持shift功能。
用到的软件是Karabiner-Elements,这个软件可以修改键盘的映射,必备软件。给软件配置一个json,如下:
vim ~/.config/karabiner/assets/complex_modifications/right_shift_toggle_chinese_english.json
内容如下:
{
"title": "Toggle Chinese English With left_shift",
"rules": [
{
"description": "left_shift 切换中英文,长按保持shift功能",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_shift",
"modifiers": {
"optional": [
"left_control"
]
}
},
"to_if_alone": [
{
"key_code": "spacebar",
"modifiers": [
"left_control"
]
}
],
"to_if_held_down": [
{
"key_code": "left_shift"
}
]
}
]
}
]
}
然后启用上面这个配置文件:
Mac默认的长按是500毫秒,改成50.
右边Shift改成Emoji功能
{ “title”: “Right Shift→Fn (Emoji) (Right Shift if alone)”, “rules”: [ { “description”: “Right Shift→Fn (Emoji) (Right Shift if alone)”, “manipulators”: [ { “type”: “basic”, “from”: { “key_code”: “right_shift”, “modifiers”: { “optional”: [ “any” ] } }, “to”: [ { “key_code”: “right_shift” } ], “to_if_alone”: [ { “key_code”: “fn” } ] } ] } ] }
赞
很赞!谢谢喵