Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for setting enter as a keyboard shortcut through the UI #85850

Open
PEZ opened this issue Nov 30, 2019 · 4 comments · May be fixed by #91315
Open

Allow for setting enter as a keyboard shortcut through the UI #85850

PEZ opened this issue Nov 30, 2019 · 4 comments · May be fixed by #91315
Assignees
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities keybindings-editor Keybinding editor issues
Milestone

Comments

@PEZ
Copy link
Contributor

PEZ commented Nov 30, 2019

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 (f359dd6, 2019-11-25T14:52:45.129Z)
OS version: Darwin x64 19.0.0

@sandy081 sandy081 self-assigned this Dec 1, 2019
@sandy081 sandy081 added keybindings-editor Keybinding editor issues feature-request Request for new features or functionality labels Dec 1, 2019
@sandy081 sandy081 added this to the Backlog Candidates milestone Dec 1, 2019
@sandy081 sandy081 added the help wanted Issues identified as good community contribution opportunities label Dec 1, 2019
@sandy081
Copy link
Member

sandy081 commented Dec 1, 2019

Great, PR would be more welcome. Please think of a design that can disable enter to accept.

@sandy081 sandy081 modified the milestones: Backlog Candidates, Backlog Dec 1, 2019
@blueworrybear
Copy link
Contributor

Hi, I'm interested in this issue. Can I work on this?

@PEZ
Copy link
Contributor Author

PEZ commented Feb 8, 2020

As far as I am concerned, yes, @blueworrybear . I had hoped to get the time with this, but then I made a workaround in my extension that killed a lot of my incentives. So it will probably not be something I find time to do.

@IceCereal
Copy link

I know this is a pretty old issue and apologies for the bump, but I'm writing this just as a reference for anyone in the future who has this problem, is looking for an answer, and happened to stumble across this issue like me.

To use only the "enter" key as a keybinding:

  1. Change the command keybinding to something random (to make it appear in your keybindings.json)
  2. Open keybindings.json (Ctrl+Shift+P > Preferences: Open Keyboard Shortcuts (JSON))
  3. Find the command that you're trying to change the keybinding of
  4. Change the value of the "key" field to "enter" ("key" : "enter",)

@sandy081 sandy081 assigned ulugbekna and unassigned sandy081 Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities keybindings-editor Keybinding editor issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants