VSIX window - key shortcut to execute ICommand

前端 未结 3 703
深忆病人
深忆病人 2021-01-21 02:51

Having a Visual Studio extension (VSIX) project: In Window we got UserControl, which have Button binded to some ICommand. Thi

3条回答
  •  囚心锁ツ
    2021-01-21 03:20

    You're right, the shortcut is used by a default Visual Studio command which takes precedence over the extension.

    From a similar msdn post, this behavior is confirmed and the suggestion is to choose a different combination.

    Find a reference for the complete list of VS shortcuts. Shortcut keys apply at various scopes (for example, when you are in a text editor, the Text Editor scoped shortcuts take precedence over the Global shortcuts). Aside from that, you can customize the shortcut's behavior and also import a new keyboard mapping scheme and select it under Tools > Options > Environment > Keyboard.

    The KeyBindings section in .vsct is where you can associate a command with a keyboard shortcut. Microsoft sample is on github

提交回复
热议问题