→ Visual Studio Extension
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.
How many shortcut keys you know in Visual Studio? Do you want to know all of them? I know how you can learn them very easy.
I'd like to introduce you a cool extension for Visual Studio 2010/2012 which I wrote with help of my colleagues Drake Campbell and Aditya Mandaleeka. Let me just copy-paste description from Visual Studio Gallery:
IntelliCommand - an extension for Visual Studio 2010 and 2012 which helps to find the short keys. It shows the help windows with all possible combinations when you press Ctrl or Shift or Alt or their combinations (hold it for about 2 seconds to see this window). Also it shows the list of possible combination when you press first combination of chord shortcut keys, like Ctrl+K, Ctrl+C (this combination comments selected text in editor).