用到的软件
用法
RightCmd + \ --> 将副屏输入源切换为 VGA RightOpt + \ --> 将副屏输入源切换为 HDMI RightCmd + RightOpt + \ --> 将副屏输入源切换为 DP
changeExternalDisplayInputSource.json
~/.config/karabiner/assets/complex_modifications/
{ "title": "Change the external display input source", "author": "win:https://github.com/hensm/ddccli; mac:https://github.com/kfix/ddcctl;", "rules": [ { "description": "Right⌘\\: Change the external display input source to VGA", "manipulators": [{ "type": "basic", "from": { "key_code": "backslash", "modifiers": { "mandatory": ["right_command"], "optional": ["caps_lock"] } }, "to": [{ "shell_command": "/usr/local/bin/ddcctl -d 1 -i 1" }] }] }, { "description": "Right⌥\\: Change the external display input source to HDMI", "manipulators": [{ "type": "basic", "from": { "key_code": "backslash", "modifiers": { "mandatory": ["right_option"], "optional": ["caps_lock"] } }, "to": [{ "shell_command": "/usr/local/bin/ddcctl -d 1 -i 17" }] }] }, { "description": "Right⌘⌥\\: Change the external display input source to DP", "manipulators": [{ "type": "basic", "from": { "key_code": "backslash", "modifiers": { "mandatory": ["right_command", "right_option"], "optional": ["caps_lock"] } }, "to": [{ "shell_command": "/usr/local/bin/ddcctl -d 1 -i 15" }] }] } ] }