LibrarySites.Banner

Repost: Sitecore Mouse and Keyboard Shortcuts

This blog post provides information about mouse and keyboard shortcuts for the Sitecore ASP.NET CMS.

This is a repost of http://sitecorejohn.spaces.live.com/blog/cns!960125F1D4A59952!725.entry.

Introduction

As promised during my presentation at dreamcore 2010 in North America, here is a list of keyboard and mouse shortcuts that you can use with the Sitecore ASP.NET CMS (the mouse pads distributed to conference participants list some of these). I will try to keep this post up to date as engineering introduces more, or as I find more. Actually, not all of these are specific to Sitecore; some may apply to Internet Explorer in general.

Login

On the Sitecore login page, after you enter your credentials and click Options, rather than selecting the UI and clicking the Login button, you can double-click a UI icon to log in. If you do this fast enough, you can avoid loading the wrong user interface when you forget to expand Options.

Some people like to press F11 to put the browser in full-screen mode when logging in to Sitecore. Then you can press ALT+T, ALT, V, T, S to hide the status bar (because ALT-V might activate the View tab in Content Editor instead of the View menu in IE).

If you right-click in Sitecore user interfaces such as the Desktop, Sitecore presents a menu, or otherwise prevents the browser menu from appearing. If you hold down the CTRL when you right click, you get the browser menu, which includes options such as Properties and View Source. Be careful which frame you click. You can use the Refresh command to refresh a single frame without the entire desktop losing its context.

Show Shortcuts in the Content Editor

In the Content Editor, if you press ALT+F1, Sitecore shows the keyboard shortcuts for the active tab. Press ALT+F1 again to hide the shortcuts. If you hover over a tab or a command, Sitecore shows the shortcut to activate that feature, if such a shortcut exists.

Keyboard Shortcuts to Activate the Content Editor Tabs

You can use the following keyboard shortcuts and then press Enter to activate specific tabs in the Content Editor:

  • ALT+H: Home
  • ALT+N: Navigate
  • ALT+R: Review
  • ALT+P: Publish
  • ALT+V: Versions
  • ALT+C: Configure
  • ALT+E: Presentation
  • ALT+S: Security
  • ALT+I: View

Content Editor Shortcuts

The following keyboard shortcuts work in the Content Editor:

  • CTRL+S: Save the selected item.
  • CTRL+D: Duplicate the selected item.
  • F2: Rename the selected item.
  • F7: Subscribe to the RSS feed for the selected item.
  • CTRL+SHFT+ALT+UP: Sort the selected item before the previous item.
  • CTRL+SHFT+ALT+DOWN: Sort the selected item after the next item.
  • CTRL+SHFT+ALT+L: Toggle protection for the selected item.
  • CTRL+SHFT+HOME: Select to home item.
  • Left: Collapse tree.
  • Right: Expand tree.
  • CTRL+SHFT+ALT+R: Toggle raw values.
  • CTRL+SHFT+ALT+T: Toggle standard fields.

The Content Editor and the Mouse Wheel

In the Content Editor, if you hover over the ribbon, you can use the mouse wheel scroll through the tabs. This is handy when you can’t remember which tab contains a command: scroll through the tabs until you see the command, and then click the command. If you expand the content tree or an editing page so that a scrollbar appears, you can hover over those frames and use the mouse wheel to scroll.

Sorting with the ALT-Drag Technique

In the Content Editor, in addition to using the ribbon and the item context menu to sort items, you can use the ALT-DRAG technique. Simply hold down the ALT key while dragging one item onto another, and Sitecore prompts you for confirmation before sorting the dragged item before the item on which it landed., without changing the sort order of any other siblings.

Update 5.May.2010: You can also use CTRL-drag to copy an item.

Context Menu and View Source

When you right-click in a Sitecore user interface, you typically get a Sitecore context menu rather than the browser’s context menu, if you get any menu at all. If you hold down the CTRL key while you right-click, you typically get the browser’s context menu instead of the Sitecore context menu. In the browser’s context menu, you can click Properties to see the URL of the frame you clicked, or View Source if you would like to see the source markup.

You can’t get the browser’s context menu in a modal dialog (such as Sitecore > Publish Site from the Sitecore desktop). If you press CTRL-SHFT-ALT-SCRLK, Windows loads the source markup of the modal dialog into a text editor.

You can also use the browser context menu to refresh an individual application in the desktop without refreshing the entire desktop, which would otherwise cause you to lose the other open applications and their context.

Assigning Keyboard Shortcuts

You can assign a keyboard shortcut to any command in the ribbon. You may have wondered why Sitecore provides a Keyboard Map application (from the Sitecore desktop, Sitecore > Development Tools > Keyboard Map). This helps you determine the keycode for any combination of keystrokes. The hard part is finding a shortcut that neither Sitecore nor the browser already uses.

Once you determine the keyboard shortcut and corresponding keycode, enter that keycode in the KeyCode field of the command definition item in the Core database.

You can also map a keyboard shortcut to a command that isn’t on the ribbon. Navigate to /sitecore/system/Settings/Key Map, create an item based on the Sitecore Client/Key Map data template, set the value of the KeyCode field to your keycode and the value of the Click field to the command to execute (from the /App_Config/commands.config file). For example, I created an item named CTRL-SHFT-ALT-G with KeyCode sca71 and Click of system:addlanguage to register additional languages.

Sitecore Desktop Shortcuts

You can use the following keyboard shortcuts in the Sitecore desktop:

  • CTRL+F2: Window manager (then click on a window).
  • CTRL+/: Focus on the search bar (then type in a search term, a GUID, a path, or the name of an application, such as Content Editor, wait a second, and then hit Enter).
  • CTRL+WIN: Sitecore menu.

Shortcuts that Work in the Content Editor and the Desktop

The following keyboard shortcuts seem to work in both the Content Editor and the desktop:

  • F9: Publish
  • CTRL+SHFT+F: Search

Firebug

You can press F12 in a Sitecore user interface to cycle through the states of Firebug Lite. You can press CTRL+SHFT+F12 to toggle the visibility of the Firebug lite console. Under the midline in the firebug console, you can enter JavaScript commands, such as console.copy(location.href);. Read more about Firebug keyboard shortcuts at the Firebug Keyboard and Mouse Shortcuts page on the Firebug wiki.

Listing Keyboard Shortcuts

One quick way to get a list of keyboard shortcuts is to use the XPath Builder feature in the Developer Center to run a query such as the following against the root item in the Core database:

//*[@KeyCode!='']

This doesn’t indicate which keycode maps to which feature. You can create an XSL rendering to generate an ad-hoc report. Switch over to the Core database, edit an XSL rendering containing code based on the following, and see what appears in the Preview pane:

<xsl:for-each select="//item[sc:fld('keycode',.)]">
  <xsl:value-of select="@template" /> - <xsl:value-of select="sc:path(.)" /> : <xsl:value-of select="sc:fld('keycode',.)" /><br />
</xsl:for-each>

It looks like the API to get a Sitecore.Web.UI.Keyboard.GetKeyCodeText().

Issues

In doing this, I found that the CTRL+SHFT+ALT+I shortcut to set the icon for an item does not work in current builds (attached to issue #325356). I also couldn’t figure out how to use the following:

  • CTRL-SHFT-LEFT: Select the previous item.
  • CTRL+SHFT+RIGHT: Select the next item.

Also, there’s a problem with F7 in current releases – it maps to both validation and subscribe commands, and subscribe wins (Sitecore Support issue #325356).

Conclusion

If you know of other Sitecore shortcuts, or anything else that would be useful in this post, please comment below. You may also be interested in The Top 100 List of why Sitecore is so cool! post on the Sitecore Australia Blog.