我正在编写 SSMS 插件。我将 o CommandBarButton 添加到 Contextmenu
CommandBarButton exportOpenContent = (CommandBarButton)menuEditorBarCommandBar.Controls.Add(MsoControlType.msoControlButton, Type.Missing, Parameter:"Global::CTRL+W, CTRL+W", Before:1, Temporary:true);
exportOpenContent.Style = MsoButtonStyle.msoButtonCaption;
exportOpenContent.Caption = "Open Content";
exportOpenContent.Tag = "Open Content";
exportOpenContent.ShortcutText = "Ctrl+W, Ctrl+W";
exportOpenContent.Click += OpenContent_Click;
我想将此命令添加到键盘快捷键,但我没有找到任何这样做的东西。当我按 CTRL+W、CTRL+W 时,此命令必须有效。我怎样才能做到这一点?