Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I find out which command name is bound to a particular key sequence in VSCode and vice-versa?

Are there commands equivalent to Emacs' C-h k and C-h w?

If not, is there at least a big file containing all keybindings I can search through?

Edit: the "vice-versa" is trivial if you know the command name. Just type it in the command prompt and it shows the associated keybinding. I'm more interested in the former.

like image 320
agentofuser Avatar asked Sep 05 '25 02:09

agentofuser


2 Answers

v1.28.0 added a better way to search for bound key chords, see search keyboard shortcuts: release notes.

Record and search keyboard shortcuts

In the Keyboard Shortcuts editor (Ctrl+K Ctrl+S), you can now search for keybindings just by typing keystrokes instead of typing out the key name (example 'shift'). Turn on the Recording Keys mode and type the keystrokes you want to search for.

You can also enter into the Recording Keys mode using Alt+K. Press the Esc key to exit from Recording Keys mode

.

like image 79
Mark Avatar answered Sep 09 '25 15:09

Mark


Open the keyboard shortcuts editor (cmd+k cmd+s), and you can search for keybindings to see what they're bound to. e.g. search cmd+s and "Save" will be returned.

You can also click the keybindings.json link on that page to see all the keybindings in json form.

like image 36
Rob Lourens Avatar answered Sep 09 '25 17:09

Rob Lourens