2017-04-26 89 views
0

我正在開發一個Visual Studio擴展,它需要使用快捷鍵Ctrl + 6執行命令,用戶應該能夠執行命令,如VS構建命令(Ctrl + F5 )。我使用了下面的方法,但它需要在選擇文本編輯器時執行該命令。請諮詢如何解決這個問題。如何執行到Visual Studio擴展的快捷鍵命令

<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> 

回答

相關問題