Welcome to MSDN Blogs Sign in | Join | Help

Sara Ford's Weblog

My adventures embracing open source on CodePlex and at Microsoft

News

    • Did you know... All author proceeds go directly to sending Hurricane Katrina survivors to college.

      Microsoft Visual Studio Tips book

      Recent Entries

Did you know… There’s a macro for listing out all the keyboard shortcuts in Visual Studio? - #370

This sample has been around for ages, at least since Visual Studio .NET 2003 era. According to the blogosphere, the sample floating around out there came from a SDET Lance (who I knew back in the day). The one below came from Sean on the VS Editor team. Regardless, I think the easiest thing to say is the following sample comes from the Visual Studio Environment Team.

The macro below will list out all of your current keybindings in the Output Window.

If you’ve never run a macro before, it’s easy. Just go to Tools – Macros – Marcos IDE to open the Macros IDE. Then in the Project Explorer (the equivalent of the Solution Explorer for macros) open MyMacros-Module1. Cut and paste everything below into the Module1 file. Lastly, put your cursor anywhere within the ListCommands() method and hit F5.

The macro is in the attached file, found at the bottom of this post.

When the macro completes, you’ll see in the Visual Studio IDE (the main VS shell) in the Output Window the full list of keyboard shortcuts.

Output Window Listing commands

Technorati Tags: ,
Posted: Wednesday, December 03, 2008 3:00 AM by saraford
Attachment(s): KeybindingMacro.txt

Comments

Serge Wautier said:

Newbie question regarding macros: Are we limited to VB or is C# an option. THe Macros IDE's Project/Add Module... dialog doesn't seem to give us choice of language.

TIA for your lights.

# December 3, 2008 12:26 PM

Aaron Marten said:

Hey, I remember Lance...that takes me back. :)

# December 3, 2008 1:15 PM

Faz said:

Hi Sara,

you forgot to talk about the "Visual C# 2008 Keybinding Reference Poster"

Here is the direct link:

http://www.microsoft.com/downloads/details.aspx?FamilyID=e5f902a8-5bb5-4cc6-907e-472809749973&displaylang=en

Regards,

# December 3, 2008 4:31 PM

Larry Culver said:

Now a shortcut to display all shortcuts available in the current context would be neat!

# December 3, 2008 4:32 PM

jwwishart said:

Now you tell us!!! :o)

You've probably has a big printout of this up on your wall... and probably been looking through them for tip ideas!

Thanks Heaps!!!

# December 3, 2008 4:53 PM

Anonymous said:

I do not see Tools | Macros option in VS 2008.  I am looking around to try to find it.  Do you have to have a project selected or something?  Because I don't see that the tools menu has a Macros option at least in VS 2008

# December 4, 2008 9:49 AM

saraford said:

sorry for the macro getting cut off. I've added it as an attachment, found right below the blog post.

# December 9, 2008 1:32 PM

xjb said:

# April 9, 2009 9:29 PM
New Comments to this post are disabled
Page view tracker