2

I went to Code->Preferences->Keyboard Shortcuts to bind ENTER to the acceptSelectedSuggestionOnEnter command (somehow my VS Code stopped letting me accept input suggestion by pressing Enter...), but I wasn't able to enter ENTER by pressing it when it asked me to "press desired key combination and then press ENTER" because the entry box closes on ENTER.

vs code version: 1.72.2 On a Mac

starball
  • 20,030
  • 7
  • 43
  • 238
coddd
  • 29
  • 2
  • 1
    Hi & welcome! It seems impossible "with dialog", but you *can create* Enter keybinding (..in `keybindings.json`).. like shown [here](https://code.visualstudio.com/docs/getstarted/keybindings#_command-arguments) – xerx593 Oct 29 '22 at 11:18

1 Answers1

0

It's difficult (impossible?) to do in the keyboard shortcuts UI for the reason you mentioned, but you can do it in the keybindings.json file with "key": "enter" like shown in the docs. You can open up keybindings.json using the Preferences: Open Keyboard Shortcuts (JSON) command in the command palette.

starball
  • 20,030
  • 7
  • 43
  • 238