vscode-which-key
vscode-which-key copied to clipboard
Show key bindings in menus
Problem
I like how the normal VS Code command menu shows key bindings on the right side of the quick-pick menu. It's a useful way to learn keyboard shortcuts.
Solution
Could which-key optionally do the same?
Sorry for the late reply. It is unlikely to be implemented atm.
- There isn't really a API from vscode we can use to read all shortcuts
- Shortcuts have context (
when
) associated to them.
The best we can do is probably
- Put it as parenthesis next the name of the binding like the follow
{
"key": "J",
"name": "Move lines down (Ctrl + x)",
"command": "editor.action.moveLinesDownAction",
}
- Have another property in the binding object like the following (but it won't account for user modified shortcuts)
{
"key": "J",
"name": "Move lines down",
"command": "editor.action.moveLinesDownAction",
"shortcuts": {
"win": "Ctrl+x",
"mac": "Cmd+x"
}
}
Thanks for looking! It's probably best not to do anything. I'd rather not see key bindings that might be wrong.