|Home | Games | Awards | About | Blog | Press Kit | Contact|
By: Jason Doucette
This article describes how to create and run a macro, from within Visual Studio .NET, which produces an HTML table showing all of your current keyboard mappings (shortcuts). It is useful for finding key bindings, and provide a much easier way to merely browse through them, rather than using Visual Studio's ridiculously small browse window (which shows 4 and a half listings at once).
How to Create the Macro
To create this macro, go into Tools menu -> Macros -> Macros IDE...
Within Project Explorer, right-click MyMacros, select Add, select Add Module...
Add a new module named 'KeyboardShortcuts'.
Copy the entire macro source (listed at the bottom of this article), and paste it into the new module. You will notice the 'Utilities' line within the source code is underlined in blue, indicating an error.
To rectify this, go into the 'Samples' directory inside Project Explorer, and find the 'Utilities' module. You need to copy this entire 'Utilities' module from the 'Samples' directory into the 'MyMacros' directory, using standard copy and paste operations. If you do not make a copy of the 'Utilities' module in the 'MyMacros' directory, the code will not be able to reference it.
Build the macro by clicking Debug menu -> Build. If there are no errors - which is indicated by a lack of any response whatsoever from the IDE <sigh> - then everything is ready. (If there is an error, the Macro IDE will highlight it, and show the error in the Task List window.) You can now close the Macro IDE window, as the macro will be run from the main Visual Studio window.
How to Run the Macro
Go to Tools menu -> Macros -> Macro Explorer.
Under 'MyMacros', under the 'KeyboardShortcuts' directory, a new macro called 'ListKeyboardShortcuts' will be available.
To run the macro, double click it. If you wish to see the macro's progress as it runs, make sure the Output window is open before you start it. The macro will take approximately 30 seconds to run. Once it is complete, copy the entire text of the Output window, and paste it into an HTML file. Sample macro output is shown within the pages linked below.
The macro originated from a 'Lance' on the Visual Studio Core Team. William Garrison found this macro on the microsoft.public.vsnet.ide newsgroup, and modified it to improve its output. I found his modifications on William's website and further modified it to clear the confusion of blank cells.
Sample Macro Output
I have run the macro from within Visual C++ .NET 2003 (v7.1), with the Keyboard Mapping Scheme set to emulate all of the possible pre-set settings. You can set it yourself by going to: Tools menu -> Options -> Environment -> Keyboard -> Keyboard Mapping Scheme. I should note that while these Keyboard Mapping Scheme settings are supposed to exactly replicate the keyboard mappings of different versions of Visual Studio, it is known to be somewhat inaccurate. I recall only one such incident, and there may be more: One of the mapping schemes did not provide a particular shortcut that an author was accustomed to. Searching the above macro's output proved that the shortcut was not only missing, but did not exist at all.
Here are the five Keyboard Mapping Schemes that come with Visual C++ .NET 2003 (v7.1):
About the Author: I am Jason Doucette of Xona Games, an award-winning, indie game studio that I co-founded with my twin brother. We make arcade-style intense retro games. Our business, our games, our technology, and we as competitive gamers have won prestigious awards and received worldwide press. Our business has won $180,000 in contests. Our games have won contests, have ranked from #1 in Canada to #1 in Japan, have become #1 best sellers in multiple countries, and held 3 of the 5 top rated spots in Japan out of all indie games on Xbox LIVE. Our game engines have been awarded for technical excellence. And we, the developers, have placed #1 in competitive gaming competitions relating to the games we make. Read about our story, our awards, our games, and view our blog.
Xona Games, Xona.com, Xonatech, Saw Tooth Distortion, Evolutionary Prototype (EP), Duality ZF, Decimation X, Decimation X2,
Decimation X3, Decimation X3.5, Decimation X4, Score Rush, Score Rush 2, and Score Rush MP
trademarked and copyrighted by Xona Games Inc., Jason Doucette, and/or Matthew Doucette.
© 2000..2005 Saw Tooth Distortion
© Xona Games Inc.
We make Intense Retro games.