Mac 上的 VS 代码键绑定 for cmd+delete

VS Code keybindings on Mac for cmd+delete

我正在尝试根据键绑定 cmd+delete 设置要执行的命令 `` 不起作用(不起作用 === 没有任何反应)

默认映射为:

{ "key": "shift+cmd+k",       "command": "editor.action.deleteLines",
                                 "when": "editorTextFocus" }

我尝试的设置是:

{ "key": "cmd+delete",        "command": "editor.action.deleteLines",
                                 "when": "editorTextFocus" }

Mac 键盘通常没有 delete 键,您可能会想到 backspace.

{ "key": "cmd+backspace",        "command": "editor.action.deleteLines",
                                 "when": "editorTextFocus" }

在 MAC 键盘中,如果您按 delete 键,它将作为 backspace

如果要执行删除操作,则必须按住fn键并按delete键。

所以这里你的设置是正确的,但你必须按 cmd+fn+delete 键。