了解 VSCode 键绑定:<cmd+X cmd+Y> 与 <cmd+X Y>
Understanding VSCode keybindings: <cmd+X cmd+Y> vs. <cmd+X Y>
这里是 VSCode 中两个键绑定的示例(出厂设置):
{ "key": "cmd+k cmd+left", "command": "workbench.action.focusLeftGroup" }
{ "key": "cmd+k left", "command": "workbench.action.moveActiveEditorGroupLeft" }
我不明白你需要对键盘做些什么不同的事情来区分这两个涉及相同按钮的命令。请赐教。
(如果您能提供对键绑定语法的详尽理解,则加分;例如 'space' 与“+”等的含义)
通常当键绑定中有“+”时,表示 "push both of these together (or hold the modifier key and hit the other key"。 space 是步骤之间的分隔符(您也可以将其视为 "let go of any keys you were holding down")。
所以"cmd+k cmd+left"表示"hold command and hit 'k' then hold command and hit left"。
但是"cmd+k left"意味着"hold command and hit 'k' then hit left (without holding any other keys)"。
这里是 VSCode 中两个键绑定的示例(出厂设置):
{ "key": "cmd+k cmd+left", "command": "workbench.action.focusLeftGroup" }
{ "key": "cmd+k left", "command": "workbench.action.moveActiveEditorGroupLeft" }
我不明白你需要对键盘做些什么不同的事情来区分这两个涉及相同按钮的命令。请赐教。
(如果您能提供对键绑定语法的详尽理解,则加分;例如 'space' 与“+”等的含义)
通常当键绑定中有“+”时,表示 "push both of these together (or hold the modifier key and hit the other key"。 space 是步骤之间的分隔符(您也可以将其视为 "let go of any keys you were holding down")。
所以"cmd+k cmd+left"表示"hold command and hit 'k' then hold command and hit left"。
但是"cmd+k left"意味着"hold command and hit 'k' then hit left (without holding any other keys)"。