You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let keybinding = keybindingService.getKeybindingForCommand(commandId);
I asked copilot :
given a command id how to get the associated keybinding
Part of the anwswer :
if you're working in an extension and need to get the keybinding for a command, there's currently no direct way to do this. You could potentially read the keybindings JSON file directly, but this would not account for user-specific keybindings or keybindings set by other extensions.
This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.
This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.
🙁 In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.
When wirting an extension, the API does not expose anyway to access a command keybinding.
I want to create an extension that provide with quickpicks the equivalent of https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf but instead of hardwiring the display of keybindings, I would like to use to get the keybinding given
a command id like so :
let keybinding = keybindingService.getKeybindingForCommand(commandId);
I asked copilot :
given a command id how to get the associated keybinding
Part of the anwswer :
if you're working in an extension and need to get the keybinding for a command, there's currently no direct way to do this. You could potentially read the keybindings JSON file directly, but this would not account for user-specific keybindings or keybindings set by other extensions.
In the meantime I will have to hardcode the keybindings.
On going work on the extension is here : https://github.com/cognominal/vscode-ext-helper-shortcuts
The text was updated successfully, but these errors were encountered: