Visual Studio Useful Keyboard Shortcut Keys
04 Sep 2022
Shortcut keys play an important role to increase the output. Developers work at least 6 to 8 hours on daily basis on Visual Studio. If the developer knows the shortcut keys, he can keep away from using of mouse and absolutely it will enhance productivity and reduce headache to use of mouse again and again. I am sharing some interesting and useful shortcut keys to work with Visual Studio. For visual studio top shortcuts refer the article Top 10 Visual Studio Keyboard Shorcuts.
General Shortcut Keys
Ctrl-X or Shift-Delete or Ctrl-L
Cuts entire line or Cuts the currently selected item to the clipboard
Delete next "word"
Ctrl-C or Ctrl-Insert
Copies the currently selected item to the clipboard
Ctrl-V or Shift-Insert
Pastes the item from the clipboard at the cursor location
Ctrl-Z or Alt-Backspace
Undo the previous editing action
To see intelligence dialog
Ctrl-Y or Ctrl-Shift-Z
Redo the previous undo action
Saves the current selected file
Saves all files and projects
Displays the Print dialog
Switches from the design view to the code view in the editor
Switches from the code view to the design view in the editor
Shift-F8 or F8
Navigate to compile time errors
Add Existing Item(file) to selected project
Add New Item(file) to selected project
Display the selected item quick output means contains value while debugging
Moves the cursor to the selected method, variable, class definition.
Finds the reference to the selected method, variable, class or the item under the cursor
Match curly braces, brackets or compiler directives
Select text between matched braces, brackets or compiler directives
Indents the currently selected line or lines by one tab stop. If there is no selection, this inserts a tab stop
Complete the syntax of an item. Example- Write for and now press Tab-Tab, then for loop syntax will be automatically completed. Similarly it works for property, index, class syntax.
Moves current line or selected lines one tab stop to the left
Backspace or Shift-Backspace
Deletes one character to the left of the cursor
Marks the current line or selected lines of code as a comment, using the correct comment syntax for the programming language
Removes the comment syntax from the current line or currently selected lines of code
Do proper alignment of all the code of design view and code view
Ctrl-T or Shift-Enter
Swaps the characters on either side of the cursor. (For example, AC|BD becomes AB|CD.) Available only in text editors
Changes the selected text to lowercase characters
Changes the selected text to uppercase characters
Select the entire word with space from start to end
Move the cursor in forward direction word by word
Select the entire line from start to end
Select the entire line from end to start
Shift-Alt-Arrows or Alt-Mouse
Column wise text selection for text manipulation
Deletes the word to the right of the cursor
Deletes the word to the left of the cursor
Jump to line number or go to line
Builds the solution
Displays the New File dialog. Note: files created this way are not associated with a project. Use Ctrl-Shift-A to add a new file in a project
Displays the New Project dialog
Displays the Open File dialog
Displays the Open Project dialog
Collapse all the methods, classes, regions in the current code behind or class file
Ctrl-M-P or Ctrl-M-L
Expands all the methods, classes, regions in the current code behind or class file
Displays the Find dialog
Displays the Replace dialog
Find the reference of selected item into entire solution.
Move from one opened file to another opened file in visual studio.
Sets or removes a breakpoint at the current line
Enables or disables the breakpoint on the current line of code. The line must already have a breakpoint for this to work
Runs the code with invoking the debugger.
Runs the code without invoking the debugger.
F4 or Alt-Enter
Displays the Properties window, which lists the design-time properties and events for the currently selected item
Displays the Server Explorer window, which allows you to view and manipulate database servers, event logs, message queues, web services, and many other operating system services
Displays the Solution Explorer, which lists the projects and files in the current solution
Displays the Toolbox, which contains controls and other items that can be dragged into editor and designer windows
Displays the Immediate window, where you can find the controls or variables values or can do data manipulation during debugging
Take our free skill tests to evaluate your skill!
In less than 5 minutes, with our skill test, you can identify your knowledge gaps and strengths.