【发布时间】:2017-04-26 15:01:49
【问题描述】:
我正在开发一个 Visual Studio 扩展,它需要使用快捷键 Ctrl + 6 执行命令,用户应该能够执行命令,如 VS 构建命令 (Ctrl + F5)。我使用了以下方法,但它需要在选择文本编辑器时执行命令。请告知如何解决此问题。
<KeyBindings>
<KeyBinding guid="CommandSet" id="MyCommand" key1="6" mod1="CONTROL" editor="guidSourceCodeTextEditor" />
</KeyBindings>
<Symbols>
<!-- This is the package guid. -->
<GuidSymbol name="MyPackage" value="{ccccc-cc-cc-cc-ccccc}" />
<GuidSymbol name ="guidSourceCodeTextEditor" value="{8b382828-6202-11d1-8870-0000f87579d2}" />
<!-- This is the guid used to group the menu commands together -->
<GuidSymbol name="CommandSet" value="{xxxxx-xxxx-xxx-xxx-xxxxxxx}">
<IDSymbol name="MyCommand" value="0x0100" />
</GuidSymbol>
</Symbols>
【问题讨论】:
标签: visual-studio-2015 vs-extensibility