Microsoft/vscode

Allow for setting `enter` as a keyboard shortcut through the UI

Open

#85,850 创建于 2019年11月30日

在 GitHub 查看
 (4 评论) (5 反应) (1 负责人)TypeScript (10,221 fork)batch import
feature-requesthelp wantedkeybindings-editor

仓库指标

Star
 (74,848 star)
PR 合并指标
 (平均合并 11小时 43分钟) (30 天内合并 1,000 个 PR)

描述

Issue Type: Feature Request

The Ask

Today you can set all keyboard shortcuts throught the UI, except those whose last chord part is a sole enter. This includes the shortcut enter. This seems to be because enter submits the shortcut's setting dialog.

My feature request is for VS Code to allow these shortcuts to be configured from the UI.

My Use Case

I'm an extension publisher and my extension has a REPL with a multiline prompt. Some users want to submit the prompt using enter, some users want to create new lines using enter. My extension allows for this to be configured as a vscode keyboard shortcut. But the instructions I have to give to my users for configuring it involves finding the keybindings.json file and disable the default shortcuts and enable whatever shortcuts they want.

I'd want to just instruct them to use the Keyboard Shortcuts UI for configuring this.

I'll Send a PR

If this is deemed something that the VS Code teams want to enable, I am willing to put in work to get it done.

One idea for how this could be allowed is the change the UI such that the user needs to click a submit button in order to set bindings. Then enter would be non-special. I think people are used to such UI:s today from various chat clients.

VS Code version: Code 1.40.2 (f359dd69833dd8800b54d458f6d37ab7c78df520, 2019-11-25T14:52:45.129Z) OS version: Darwin x64 19.0.0

贡献者指南