VSIX KeyBindings Not Assigned

I need issgin CTRL + F12 and CTRL + G

This code does not work

<KeyBindings>
 <KeyBinding guid="guidCmdSet" id="cmdSolutionList" editor="guidVSStd97" key1="VK_F12" mod1="CONTROL" />
 <KeyBinding guid="guidCmdSet" id="cmdCodeItemsList" editor="guidVSStd97" key1="G" mod1="CONTROL" />
</KeyBindings>

But this code works

<KeyBindings>
 <KeyBinding guid="guidCmdSet" id="cmdCodeItemsList" editor="guidVSStd97" key1="0" mod1="CONTROL" />
</KeyBindings>

Why not work?

How to assign CTRL + F12 and CTRL + G?

+4
source share
1 answer

Set code binding

Command command = SolutionList.DTE.Commands.Item("Name1", -1);
command.Bindings = "Global::Ctrl+F12";
command = SolutionList.DTE.Commands.Item("Name2", -1);
command.Bindings = "Global::Ctrl+G";
+1
source

Source: https://habr.com/ru/post/1606132/


All Articles