Denis Gladkikh


My personal blog about software development

  • 09 Oct 2013
  • Visual Studio 2010, CodePlex, Visual Studio 2012, Visual Studio Extension, IntelliCommand, OSS

Almost year ago we published IntelliCommand extension on Visual Studio Gallery. This extension helps you to learn shortcut keys in Visual Studio (check screenshots on Gallery site). IntelliCommand was a result of Visual Studio hackathon event, which I built with my coworkers (btw, we took first place).

For last year IntelliCommand has been downloaded more than 12 000 times. I think that this is good number for so small extension.

Today we decided to publish source code of this extension on CodePlex. Feel free to take a look on it, fix any bugs you've seen or add any features you always wanted.

If you want to build this solution you need to have Visual Studio 2010 with Service Pack 1 and Visual Studio 2010 SDK SP1. We used Visual Studio 2010 on purpose, because we know that there are a lot of people who still use Visual Studio 2010 as main IDE, and also we know that Visual Studio has very good back compatibility model. We built this extension only for Visual Studio 2010, specified that it can be used in Visual Studio 2012 and 2013 and at the end it works on all three versions of Visual Studio. Pretty cool, right?

If you will decide to look deeper in source code, there are some help for you:

  • CommandScopeService.cs - this class helps us to find out current scope in Visual Studio. We need it, because different scopes have different set of shortcut keys. For example WinForms designer has completely different set of shortcut keys than Editor.
  • KeyboardListenerService.cs - global keyboard listener, which also can filter keyboard events per current process.
  • CommandInfosLoader.cs - loads all command bindings available in Visual Studio instance and store all them in CommandsContainer.
  • CommandsPresenter.cs - main class which stitch everything together.
  • CommandsPanel.cs - special WPF panel, which can calculate size of the panel based on the list of shortcut keys available.

Code is not perfect, because this project always was just a prototype. But I hope that it will give you some knowledge about how to build Visual Studio extensions, and maybe will give you some ideas about some new cool extensions for Visual Studio.