Skip to content
This repository has been archived by the owner on Oct 16, 2020. It is now read-only.

Keyboard Shortcuts

alxzaur edited this page Oct 2, 2014 · 9 revisions

The list of shortcuts is grouped by working areas, primary according to main menu items.

The following main menu items have no shortcuts:

  • Refactoring
  • Format (in designer mode)

(All shortcuts are in alphabethic order: Shift, Ctrl, Ctrl+Shift, Ctrl+Alt, Alt, Alt+Shift)

Note:

Descriptions, that contain '???' characters in the MenuItem column, may be incorrect because I never used this feature or my English has gaps. I'll bother to correct these sentences after connecting the #D developers.

Editor 1: Move Caret, Select Text

These shortcuts work as Windows standard.

ShortCut MenuItem Feature, Description
Insert Toggle insert mode
Delete Delete selected text or single object
Left Set caret one character to the left
Shift+Left Select one character to the left
Ctrl+Left Set caret one word to the left
Ctrl+Shift+Left Select one word to the left
Right Set caret one character to the right
Shift+Right Select one character to the right
Ctrl+Right Set caret one word to the right
Ctrl+Shift+Right Select one word to the right
Up Set caret one line upwards
Shift+Up Select one line upwards
Ctrl+Up Scroll one line upwards
Down Set caret one line downwards
Shift+Down Select one line downwards
Ctrl+Down Scroll one line downwards
Home Set caret to the start of the line
Shift+Home Select from caret to the start of the line
Ctrl+Home Set caret to the start of the text
Ctrl+Shift+Home Select from caret to the start of the text
End Set caret to the end of the line
Shift+End Select from caret to the end of the line
Ctrl+End Set caret to the end of the text
Ctrl+Shift+End Select from caret to the end of the text
PageUp Set caret one page upwards
Shift+PageUp Select from caret one page upwards
PageDown Set caret one page downwards
Shift+PageDown Select from caret one page downwards

Editor 2: Standard Shortcuts

These shortcuts work like Windows standard, partially adapted to developer's requirements. They can be used in editor mode (text) as well as in designer mode (controls).

ShortCut MenuItem Feature, Description
Ctrl+Delete Delete Word
Ctrl+Backspace Word Backspace, i.e. delete word backwards
Ctrl+A Edit > Select All Select All the text/objects
Ctrl+C, Ctrl+Insert Edit > Copy Copy the selection to clipboard
Ctrl+V, Shift+Insert Edit > Paste Insert (paste) from clipboard
Ctrl+X, Shift+Delete Edit > Cut Extract the selected text/object
Ctrl+Y Edit > Redo Redo the last change(s)
Ctrl+Z, Alt+Backspace Edit > Undo Undo the last change(s)

Editor 3: Additional Shortcuts

These shortcuts make a developer's work easier.

ShortCut MenuItem Feature, Description
Escape Editor mode Clear all selections
Escape Designer mode Go to default property in the property grid
Ctrl+Space Show a list containing members of the current object
Ctrl+Enter Context Goto Definition
Alt+Insert Tools > Auto code generation Auto code generation: open a dialog where you can select special items
Ctrl+PageUp, Ctrl+PageDown Toggle mode between editor mode and designer mode
Ctrl+Divide, Ctrl+OemQuestion Toggle comments related to the selected source code
Ctrl+D Delete current line
Ctrl+Shift+D Delete from caret until end of line
Ctrl+Shift+G Edit > Insert > Insert new GUID GUID insert
Ctrl+I Edit > Format > Indent Indent adaptation: The indent of the selected text will be changed in the way it is set in options and needed by code structure.
Ctrl+J Code Templates: Open a dialog to choose a pre-defined code snippet; you can edit them in: "Tools > Options > Coding > Code Templates"
Ctrl+Shift+L Edit > Folding > Toggle all folds Code folding: Switch all foldings
Ctrl+Shift+M Edit > Folding > Toggle fold Code folding: Switch folding of the current section; to do so you must set the cursor in the first line of this section
Ctrl+Shift+P Edit > Folding > Show definitions only Code folding: Show definitions only
Tab Indent selected code
Shift+Tab Dedent selected code

File Shortcuts

These shortcuts work similar like Windows standard: Ctrl is related to a single file, Ctrl+Shift is related to a solution or project.

ShortCut MenuItem Feature, Description
Ctrl+N File > New > File New file: Start to create a new file, either as part of the current project or as single file
Ctrl+Shift+N File > New > Solution New solution: Start to create a new solution 1
Ctrl+O File > Open > File Open file: Open an existing file
Ctrl+Shift+O File > Open > Project/Solution Open project or solution: Open an existing project or solution
Ctrl+S File > Save Save the current file
Ctrl+Shift+S File > Save all Save all open files if changed
Ctrl+Shift+U File > Reload file Reload the current file; all changes are rejected
F2 Explorer Context Rename file or item 2
Ctrl+F4 File > Close > File Close the current file
Ctrl+Shift+F4 File > Close > Solution Close the current solution

Note:

  1. There is no shortcut to add a project to the current solution.
  2. F2 has another meaning in the source code editor; see the Bookmarks section.

File Menu Shortcuts

These shortcuts work as Windows standard.

ShortCut MenuItem Feature, Description
Ctrl+P File > Print Print the current file 1.
Alt+F4 File > Exit Exit the application.

Note:

  1. You can only print source code, but not the image of a form.

Views 1: Internal Tool Windows

The #D editor contains a lot of tool windows (WinForm.FormBorderStyle FixedToolWindow or SizableToolWindow), that are included in the DockPanelSuite and are shown by the following shortcuts. (The description tells, too, on which side of the panel suite a window is shown.)

ShortCut MenuItem Feature, Description
Ctrl+Shift+B View > Boo Interpreter ??? Show the Boo interpreter (lower side)
Ctrl+Shift+C View > Classes Show all Classes of the solution (right side)
Ctrl+Alt+D View > Server Explorer ??? Show the Server (Database) Explorer, i.e. the data classes of the solution (right side)
Ctrl+Alt+F View > Tools > Files Show the File Explorer this is an explorer independent of the solution‘s files (left side)
Ctrl+Alt+G View > Tools ??? > Code Coverage Code-Coverage (lower side)
Ctrl+Alt+K View > Errors Show compile Errors and warnings (lower side)
Ctrl+Alt+L View > Project Explorer Show a tree view containing a solution's Projects and all references and files (left side)
Ctrl+Alt+O View > Output ??? Show the Output window containing messages while compiling (lower side)
??? Is it able to use this window for Console.WriteLine() while running an application?
Ctrl+Alt+X View > Tools Show the Toolbox containing especially the designer controls (left side)
F4 View > Properties Show the PropertyGrid (right side)

Note:

  1. In the View menu there are two items named Tools: this one and another one with subitems to external tools.
  2. You cannot go directly to the property grid via F4, you must use the mouse.

Views 2: External Tools

These shortcuts show additional tool windows of add-ins. They are called both by menu items "View > Tools >" and "Tools".

ShortCut MenuItem Feature, Description
Ctrl+Q Tools > Quick XML Doc ??? Create a Quick XML documentation
Ctrl+Alt+Q View > Tools > Report Explorer ??? Show the Report Explorer
Ctrl+Alt+R Tools > Report Generator ??? Call the Report Generator SharpReport
Ctrl+Alt+T View > Tools > Unit Tests ??? Show the Unit Testing list

Views 3: Debugger Windows

These shortcuts show the tool windows used while debugging (most of them on the lower side of the panel suite). All of them can be called by menu items "View > Debug >".

ShortCut MenuItem Feature, Description
Ctrl+Alt+C > Callstack ??? Show the Callstack (i.e. stack trace) window
Ctrl+Alt+H > Threads ??? Show the Threads (right side) window
Ctrl+Alt+P > Breakpoints Show the Breakpoints (right side) window
Ctrl+Alt+U > Loaded modules ??? Show the Units / Modules window
Ctrl+Alt+V > Local variables Show the Local Variables window

Project/Solution

These shortcuts concern the building of a solution or project. They are called by menu items "Build".

ShortCut MenuItem Feature, Description
F8 > Build Solution Build all projects of the solution
Alt+F8 > Rebuild Solution Rebuild all projects of the solution
F9 > Build (project name) Build activated project
Alt+F9 > Rebuild (project name) Rebuild activated project

Debugger

These shortcuts are used to run with or without debugging. They are called by menu items "Debug".

ShortCut MenuItem Feature, Description
Ctrl+Alt+B > Break Break debugging: Try to stop executing and to show the current instruction
F5 > Run Run application: If configuration is set to debug, then run with debugger; if it es set to release, then run without debugger. 1, 2
Ctrl+F5 > Run without debugger Run application without debugger
F6 > Continue debugging Continue debugging: Continue to run the application without new stops until the next breakpoint is reached
F7 > Toggle breakpoint Toggle breakpoint: Switch on or off a breakpoint at the current source code line
F10 > Step over Run Next Instruction; if this one calls another method, then that method's debugging is stepped over
F11 > Step into Run Next Detailed Instruction; if this one calls another method, then that method's instructions are debugged step by step
Shift+F11 > Step out Run application until the current method is finished

Note:

  1. If a project is set as start project, then F5 will always try to start that project and prebuild referenced assemblies; if you want to start another project, you should sign this project in project explorer and start it via context menu.
  2. After breakpoint, you have to press F6 to continue (not F5).

Find/Replace

These shortcuts are used to search and replace specific text in the source code editor. They are called by menu items "Search".

ShortCut MenuItem Feature, Description
Ctrl+E > Incremental Search Begin to search forward for one or more Characters Incremental until you press any non-character key or no match is found
Ctrl+Shift+E > Reverse Incremental Search Begin to search backward for one or more Characters Incremental until you press any non-character key or no match is found
Ctrl+F > Find Open the extensive Find Dialog window
Ctrl+G > Goto Line Number Open a GoTo Dialog window where you can search for line numbers and/or class names
Ctrl+R > Replace Open the extensive Find Dialog window with replace possibilities
F3 > Find Next Repeat searching for the text set in Find Dialog
Ctrl+F3 > Find Next Selected Go to the Next Occurrence in the search results window

Bookmarks

These shortcuts are used to set and search specific lines in the source code editor. They are called by menu items "Search".

ShortCut MenuItem Feature, Description
Ctrl+B > Goto Matching Brace If the caret's position is behind a bracket, you'll move the caret to the matching bracket. This works for '(', ')', '[', ']', '{', '}', but not '<', '>'.
F2 > Next Bookmark Go to Next Bookmark
Ctrl+F2 > Toggle Bookmark Toggle Bookmark: Switch a bookmark at the current line on or off
Alt+F2 > Prev Bookmark Go to Previous Bookmark

Window

These shortcuts affect the main window in the panel suite.

ShortCut MenuItem Feature, Description
Ctrl+Tab Window > Next Window Go to Next Window in the editor range
Ctrl+Shift+Tab Window > Prev Window Go to Previous Window in the editor range
Shift+Esc Toggle Maximizing the source window (toggles Plain layout)
Ctrl+PageUp, Ctrl+PageDown Toggle mode between editor mode and designer mode

Help

These shortcuts show integrated help of .NET Framework documentation or SharpDevelop Wiki. They are called by menu items "Help". Content, index, terms are shown in a tool window (right side); descriptions are shown in the main window.

Note:

I don't use these features because I think that the integrated documentation looks confused. I prefer to open it as separate window with the Microsoft Document Explorer application.

ShortCut MenuItem Feature, Description
F1 > Context help Show suitable search results for the current term
Ctrl+F1 > Dynamic Help Show dynamic suitable search results for all current terms
Alt+F1 > Help Topics Show the main page of SharpDevelop Wiki
Alt+Ctrl+F1 > Contents Enable to look for any term
Shift+Alt+F2 > Index results Enable to look for a specific term
Alt+Ctrl+F2 > Index Show the index of the .NET documentation
Alt+Ctrl+F3 > Search Enable to look for a specific term
Clone this wiki locally