Like most C# developers I use Visual Studio. One of the things I love about this IDE is that it contains a lot of shortcuts and key combinations, which make it easier and faster to finish your code. In this blog, I want to tell you about my favorite and most used Visual Studio shortcuts and key combinations. That doesn’t mean you need to use them, but I hope some might sound helpful to you.
Yes, more and more people are using Visual Studio Code, but I prefer Visual Studio since its sole purpose is C# and other Microsoft languages, frameworks, and techniques. Visual Studio Code is more of an I-know-a-bit-of-everything type of application. But this is my personal opinion.
Keyboard Setting
The Visual Studio shortcuts you can use and how to use them depend on your Visual Studio keyboard settings. There are different keyboard mappings. I use Visual C# 2005. Some key (combinations) are the same in different mappings, but some differences exist. Visual C# 2006 uses F6 to build the solution, and another mapping uses CTRL + B.
To change the keyboard mapping, open Visual Studio and access Tools -> Options. In the category Environment find Keyboard. Change the scheme to Visual C# 2005 and press the button Reset.

This is also where you can change some mappings to your liking. I would not recommend that. If you work in different locations with different accounts, you have different key mappings everywhere. You can keep changing them, but it could get a nuisance.
But, if you use an account with Visual Studio, your settings are stored in the cloud. These settings are downloaded when you log into a different Visual Studio.
F5 – Run
The most used key I use in Visual Studio is the F5 key. This one runs the current startup application. Sure, you could move your mouse to the run button, but pressing a key on your keyboard is way quicker.
If Visual Studio is running your application and you want to stop it, press SHIFT + F5. This combination will stop the debugger. If you want to run your application without debugging, press CTRL + F5.
Or press the green play arrow at the top of Visual Studio.
F6 – Build Solution
The F6 key builds the solution. So each project that has been changed will be (re)built and compiled to the debug DLL, EXE, or whatever type. It’s a good way to see if there are any compile errors. Especially when you just changed code in different files.
If you only want to build the solution you are currently focused on (the file you are working on), then press SHIFT + F6.
Or go to the menu item Build and select Build Solution. Or right-click on the solution in the Solution Explorer and select Build Solution.
CTRL + . – Quick Actions and Refactorings
The most helpful key combo that has ever been invented in Visual Studio: Quick Actions and Refactorings. When you see that annoying red line under some code you know there is something wrong. While you have two hands on your keyboard, move the cursor to the error with the arrow keys and press CTRL + . (dot). This will show Quick Actions and Refactorings and it gives suggestions on how to continue.
It can help by fixing problems, refactoring code, installing NuGet packages if needed, clean up code… A lot.
Or right-click with your mouse on the error, problem, whatever, and select Quick Actions and Refactorings.
CTRL + SPACE – IntelliSense
While writing code, you can use the CTRL + SPACE to call IntelliSense. A great little tool that helps you discover methods and classes, finish pieces of code (non-AI), or fix typos.
Or if you just type behind a property or variable and you lost the IntelliSense by pressing ESC, you can recall it by using the CTRL + SPACE.
CTRL + Q – Quick Search
I personally love the search option in applications. I remember the days when I had to scroll through a lot of menu items to find that one item, which was usually located in the first menu I already looked at. This option usually helps you discover and find the item you are looking for.
Visual Studio has this option too. If you press CTRL + Q you will see a popup window with two options: Code search and feature search. While the first one is self-explanatory, the second needs some more info.
The feature search can find any feature inside Visual Studio. An example; I always turn on the Active tracking, which means that when I click on an open file in the editor, that file gets highlighted in the Solution Explorer. The Active tracking is located in the Options window -> Projects and Solutions -> General. But if you use the feature search you have found it pretty quick.

Or click on the Search button on top of Visual Studio, right of the Help menu item.
F9 – Add/Remove Breakpoint
Debugging is important. So it’s a good thing it’s even easier to place breakpoints in code. If you are working on a line that needs a breakpoint, press F9, then F5, and hit that breakpoint. If you want to remove the breakpoint, focus on the same line and press F9 again.
Or click on the gray, vertical bar left of the line numbers. You will see the red dot when you added the breakpoint.
F10 and F11 – Step Over And Step Into
While you have hit a breakpoint you might want to walk through the code while running the application. With F10 you can jump to the next line in the file. This way you can follow what your application and code are doing.
The F11 jumps into a method. Then you can use theF10 again to walk through the code of that method. At the end of the method, F10 will bring you back to the location where you entered the method.
Or press the buttons with your mouse in the toolbar, located somewhere right of the play button.
F12 – Go To Definition
When you are debugging and hit a breakpoint or you are working on your code and you want to jump to a definition of a class, method, or property, simply hit F12 while the cursor is on that particular class, method, or property.
If you just want a peek (a quick view of the code) of the definition, press ALT + F12. This will show a blue-ish screen below the name and show you the code.
If you use this on an interface and press F12, you go to the interface. If you press CTRL + F12 you will jump to the implementation of the interface. A list will be shown if the interface has more than one implementation.
Or right-click on the name and select Go To Definition.
CTRL + R, CTRL + R – Rename
Another powerful feature and key combo in Visual Studio. Do you know that feeling when you have been writing this cool code, with interfaces, classes, methods, and more, but then you realize you used the wrong name for a property that is being used throughout 10 files? Well, I do!
You could just rename it and change it wherever there is a compile error. Or you could just rename the property by putting your cursor on the name of the property (could be everywhere, doesn’t have to be in the class itself) and press CTRL + R, CTRL + R. You can now rename the property and when you press enter, every reference of that property will be changed.
With rename you can also rename classes, interface, enums… Well, everything. You can also press F2. No idea why there are two options to quickly rename something.

Or you can right-click on the name of something and choose Rename.
CTRL + K, CTRL + E – Clean up code
I missed this in the early days of Visual Studio, which made ReSharper the best addon EVER. Indentation, unused usings, unused variables, unwanted spaces, and more. Things you had to clean up before you committed your code. Something you had to do by hand.
But Visual Studio has Clean up code, a powerful feature that will check your code and it will try to fix the format and clean up a lot. Every time I am done with a method or class, I use this key combo to make sure everything is in order and cleaned up.
I highly recommend this one, because it helps keep your code files clean and organized.
Conclusion On Visual Studio Shortcuts
These are my most used Visual Studio shortcuts. Maybe you use others as well? Share them in the comments. Not everyone is a fan of key combos or shortcuts. Which is fine, but I do think using them makes you work way faster. When I am coding I hardly touch my mouse.
There are far more key combos in this big IDE. Not only to make your coding better, but also for unit testing, GIT, and more. You can find most of them in the keyboard setting where you can take a look at the mappings.
Microsoft also created a list of shortcuts in Visual Studio that show a few even I didn’t know. You can find it here.