When I try to test out keybindings.editor.copyCommandTitle
by assigning to it a key, it doesn’t seem to do anything. Is this because it does nothing?
Question posted in Visual Studio Code
View the official documentation.
View the official documentation.
2
Answers
It literally copies the command title when you’re in the keybindings editor.
I have it bound myself and it works fine for me. Maybe you’re not in the keybindings editor or you don’t have a keybinding focused.
When in the keybindings editor and a keybinding is focused, it copies the keybinding’s command’s title to the clipboard
^ copied from https://github.com/microsoft/vscode/blob/111a6f72380eb66d91baf171692be2177df652e8/src/vs/workbench/contrib/preferences/browser/preferences.contribution.ts#L1101. Definition of
copyKeybindingCommandTitle
is in https://github.com/microsoft/vscode/blob/111a6f72380eb66d91baf171692be2177df652e8/src/vs/workbench/contrib/preferences/browser/keybindingsEditor.ts#L300 and does what its name says it does.