Tips: keyboard shortcuts

We’ve been doing some technical investigation around improving the Power Commands functionality lately. As part of that, we’ve been over some of the keyboard shortcuts in .NET Reflector, with a view to making some of them more sensible.

Reflector doesn’t have too many keyboard shortcuts but some of them are pretty useful, and you may not know about them all. I’ve picked out some of the more useful ones and detailed them below.

Open assembly – Ctrl+O

Pretty self-explanatory, opens a dialog which allows you to browse to an assembly and open it:

Open assembly list – Ctrl+L

This brings up the Assembly list management dialog. You can have multiple assembly lists so that you can easily switch back and forth between different versions of the framework or any other set of assemblies you choose to define:

Export Assembly Source Code – Ctrl+S

This is only available at the top level of an assembly. Takes you to the export dialog which allows you to generate a visual studio project for an assembly. While not necessarily fully compilable it does go some way to recovering the source code you may have lost.

We should probably assign this to a key rather than “S”…

Open new tab – Ctrl+left mouse button click (or mouse 3)

… erm, this opens a new tab containing the code for the thing you were clicking on.

Close Current Tab – Ctrl+F4

Yes, this closes the tab which currently has focus.

Open Bookmarks Pane – F2

Opens the bookmark pane and displays links to any code that you’ve previously bookmarked:

Toggle bookmark – Ctrl+K

Allows you to set up a bookmark for a particular method, type or assembly.

Open Search – F3

Opens the search panel. It’s also worth noting that you can change what you search by when this pane has focus. See the screenshot below:

Decompile Assembly – Space or mouse click

This displays code in the currently active tab. The click part is reasonably intuitive, but you might not know about Space.

Open Analyze Pane – Ctrl+R

Opens the Analyze pane so that you can do some analytical investigation on whatever was highlighted in the assembly tree:

Close assembly – Delete

Closes the currently highlighted assembly in the assembly tree.

Search MSDN – Ctrl+M

Available at the namespace level for framework classes – Searches MSDN for documentation on this namespace.

Leave a Reply

Your email address will not be published. Required fields are marked *