Skip to content

VsctCommandMapping breaks the undocumented keybinding support #536

@mitchcapper

Description

@mitchcapper

After going back to old style commands to get keyboard shortcuts to work again I was accidentally noticed keybindings do work with VSExtensibility. My initial tests failed simply due to caching, so contrary to #477 things were looking up. Then I wanted to be able to show the user what key bindings (if any) they had assigned to the command. Easy enough we have EnvDTE.Commands but we dont have the GUID or ID for Microsoft.VisualStudio.Extensibility.Commands.Command . In addition both Name and LocalizedName are blank for the actual command.

So I thought well lets try VsctCommandMapping then we create a faux button in the vsct and then pass that to command mapping. It worked. Command still showed up in key bindings, when I get the command using the guid/id from EnvDTE.Commands it nicely returns the correct binding information. Sadly this actually breaks it catching the execution of the key binding. While it works in the menu bar to execute the command the keybinding no longer does anything.

Granted, as stated, keybindings are not a priority but as they generally work I figured I would mention this case in which they don't.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions