1

I'm interested in a list of all available shortcuts of WPF controls. I was mainly interested in the standard shortcuts for WPF TreeView control (e.g., expand/collapse all, select all and so on), but I can't seem to find any location that lists them. Is there a specific page listing available shortcuts for WPF controls?

I know some shortcuts are supported naively, e.g., Ctrl + A will select all rows in a given ListView control.

I could define my own shortcuts and implement their behaviour. However, I feel it is not a good practice to define shortcuts that are already supported by the .NET framework and hence the need to know about such supported shortcuts.

In other situations I would typically use the same shortcuts available in Visual Studio as it is a WPF application, but I am hopping here for a more extensive list of out of the box supported shortcuts in WPF controls.

1
  • 1
    edited my answer. Not sure how much that stuff will help you, but its better than nothing I suppose :) Commented Jul 13, 2015 at 15:37

2 Answers 2

5

Thanks to psoshmo for pointing to the MSDN article. It'd be nice if they were all listed out so you didn't have to comb through a bunch of links to figure it out. So here they are. This is not all the commands, just the once with default key bindings.

  • Application Commands: ApplicationCommands

    • ContextMenu: Shift+F10
    • Copy: Ctrl+C || Ctrl+Insert
    • Cut: Ctrl+X || Shift+Delete
    • Delete: Del
    • Find: Ctrl+F
    • Help: F1
    • New: Ctrl+N
    • Open: Ctrl+O
    • Paste: Ctrl+V || Shift+Insert
    • Print: Ctrl+P
    • PrintPreview: Ctrl+F2
    • Properties: F4
    • Redo: Ctrl+Y
    • Replace: Ctrl+H
    • Save: Ctrl+S
    • SelectAll: Ctrl+A
    • Stop: Esc
    • Undo: Ctrl-Z
  • Navigation Commands: NavigationCommands

    • BrowseBack: Alt+Left
    • BrowseForward: Alt+Right
    • BrowseHome: Alt+Home
    • BrowseStop: Alt+Esc
    • Favorites: Ctrl+I
    • Refresh: F5
    • Search: F3
  • Media Commands: MediaCommands

    • None
  • Component Commands: ComponentCommands

    • ExtendSelectionDown: Shift+Down
    • ExtendSelectionLeft: Shift+Left
    • ExtendSelectionRight: Shift+Right
    • ExtendSelectionUp: Shift+Up
    • MoveDown: Down
    • MoveFocusBack: Ctrl+Left
    • MoveFocusDown: Ctrl+Down
    • MoveFocusForward: Ctrl+Right
    • MoveFocusPageDown: Ctrl+PageDown
    • MoveFocusPageUp: Ctrl+PageUp
    • MoveFocusUp: Ctrl+Up
    • MoveLeft: Left
    • MoveRight: Right
    • MoveToEnd: End
    • MoveToHome: Home
    • MoveToPageDown: PageDown
    • MoveToPageUp: PageUp
    • MoveUp: Up
    • ScrollPageDown: PageDown
    • ScrollPageUp: PageUp
    • SelectToEnd: Shift+End
    • SelectToHome: Shift+Home
    • SelectToPageDown: Shift+PageDown
    • SelectToPageUp: Shift+PageUp
  • Editing Commands: EditingCommands

    • AlignCenter: Ctrl+E
    • AlignJustify: Ctrl+J
    • AlignLeft: Ctrl+L
    • AlignRight: Ctrl+R
    • Backspace: Backspace
    • DecreaseFontSize: Ctrl+OemOpenBrackets
    • DecreaseIndentation: Ctrl+Shift+T
    • Delete: Delete
    • DeleteNextWord: Ctrl+Delete
    • DeletePreviousWord: Ctrl+Backspace
    • EnterLineBreak: Shift+Enter
    • EnterParagraphBreak: Enter
    • IncreaseFontSize: Ctrl+OemCloseBrackets
    • IncreaseIndentation: Ctrl+T
    • MoveDownByLine: Down
    • MoveDownByPage: PageDown
    • MoveDownByParagraph: Ctrl+Down
    • MoveLeftByCharacter: Left
    • MoveLeftByWord: Ctrl+Left
    • MoveRightByCharacter: Right
    • MoveRightByWord: Ctrl+Right
    • MoveToDocumentEnd: Ctrl+End
    • MoveToDocumentStart: Ctrl+Home
    • MoveToLineEnd: End
    • MoveToLineStart: Home
    • MoveUpByLine: Up
    • MoveUpByPage: PageUp
    • MoveUpByParagraph: Ctrl+Up
    • SelectDownByLine: Shift+Down
    • SelectDownByPage: Shift+PageDown
    • SelectDownByParagraph: Ctrl+Shift+Down
    • SelectLeftByCharacter: Shift+Left
    • SelectLeftByWord: Ctrl+Shift+Left
    • SelectRightByCharacter: Shift+Right
    • SelectRightByWord: Ctrl+Shift+Right
    • SelectToDocumentEnd: Ctrl+Shift+End
    • SelectToDocumentStart: Ctrl+Shift+Home
    • SelectToLineEnd: Shift+End
    • SelectToLineStart: Shift+Home
    • SelectUpByLine: Shift+Up
    • SelectUpByPage: Shift+PageUp
    • SelectUpByParagraph: Ctrl+Shift+Up
    • TabBackward: Shift+Tab
    • TabForward: Tab
    • ToggleBold: Ctrl+B
    • ToggleBullets: Ctrl+Shift+L
    • ToggleInsert: Insert
    • ToggleItalic: Ctrl+I
    • ToggleNumbering: Ctrl+Shift+N
    • ToggleSubscript: Ctrl+OemPlus
    • ToggleSuperscript: Ctrl+Shift+OemPlus
    • ToggleUnderline: Ctrl+U

Update 2016-01-12: I missed the Editing Commands as they are referenced in another place. The article for them also lists out the default key bindings, which can be found here.

Update 2018-04-16: Added Editing Commands and added links.

Sign up to request clarification or add additional context in comments.

Comments

1

As far as I know, there is no master list of supported shortcuts, and you are right that they in general will inherit their shortcuts from the basic shortcuts in Windows. I have searched for this on my own before and have never been able to locate a list. Others I have seen asking on the internet have also never had any luck.

So the unfortunate answer is: No, there is no list.

EDIT: OK, after some digging, the best I can give you is a list of pre-defined commands that you can apply to your controls that are built into WPF. These come in five categories:

  • Application Commands
  • Navigation Commands
  • Component Commands
  • Media Commands
  • Editing Commands

Their documentation can be found on MSDN here (an example). Clicking on one of the commands will take you to its individual page which will list their default shortcut like this as its "Key Gesture" property.

You can assign these default commands to controls like so:

  <Button Command="ApplicationCommands.Cut" CommandTarget="{Binding ElementName=txtEditor}" Width="60">_Cut</Button>
  <Button Command="ApplicationCommands.Paste" CommandTarget="{Binding ElementName=txtEditor}" Width="60" Margin="3,0">_Paste</Button>

This is a seemingly pretty basic tutorial on binding these commands to buttons and what not (where that code is from). This doesn't tell you what commands are there by default, but it should be able to at least deduce the keyboard shortcuts for some of these commands, for whatever that's worth.

4 Comments

Thanks, yes it does not seem to be the case. I know of this support.microsoft.com/en-us/kb/126449 for shortcuts supported by Windows and of this visualstudioshortcuts.com for VS shortcuts but indeed I can't find a more comprehensive list. I will hold on your answer, perhaps others can point to a good resource. thanks.
Yea your question has made me go back and dig through google again looking for an answer, mainly out of my own curiosity. Ill edit and let you know If I find anything :)
As you said "for whatever thats worth" but at least one can use some of those standard commands and when needed one can imitate the shortcut definition on established WPF based applications. Thanks for your effort psoshmo :)
@Ahmad hey no problem :) Wish I couldve helped more. Good luck!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.