Welcome to MSDN Blogs Sign in | Join | Help

Bertan's Blog

Developer @ Developer Solutions
Assigning shortcut keys to add-in commands in Visual Studio

If you are using a Visual Studio add-in you love but you wanted to have shortcuts for its menu entries, you are not completely out of luck. Using Visual Studio options, you can add shortcut keys to any Visual Studio command including the ones created by add-ins.

 In order to add a shortcuy key, you should go to Tools -> Options and choose Environment -> Keyboard pane. This pane contains a list of commands available in Visual Studio, most of the time commands have a meaningful name so you can easily search them. Below is a list of commands for some add-ins we have developed:

  • Microsoft.VSPowerToys.ResourceRefactor.Connect.RefactorLiteral: Opens up "Extract to Resource" dialog
  • Microsoft.VSPowerToys.VSCmdShell.Connect.VSCmdShellWindow: Opens up "VSCmdShell" dialog.

Once you select the command you want, you can assign it any shortcuy key you want. You can also choose the context where shortcuts will be enabled. For example for resource refactoring tool command, it will probably be best to choose "Text Editor" as the context since the command will not execute successfully in any other context.

Posted: Monday, November 27, 2006 11:27 PM by bertaygu
Filed under: ,

Comments

Jason Haley said:

# November 28, 2006 12:09 AM
Anonymous comments are disabled
Page view tracker