我需要启用CTRL + F12和CTRL + G
此代码不起作用
<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>
但是这段代码工作
<KeyBindings>
<KeyBinding guid="guidCmdSet" id="cmdCodeItemsList" editor="guidVSStd97" key1="0" mod1="CONTROL" />
</KeyBindings>
为什么不工作?
如何指定CTRL + F12和CTRL + G?
答案 0 :(得分:1)
使用代码
设置绑定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";