Start tracking your progress
Trailhead Home
Trailhead Home

Customize Keyboard Shortcuts for Agents

Learning Objectives

After completing this unit, you’ll be able to:
  • Understand keyboard shortcuts.
  • Turn on keyboard shortcuts for a console.
  • Customize standard keyboard shortcuts to boost agent productivity.
  • Learn about the process for creating custom keyboard shortcuts from scratch.

Introduction to Keyboard Shortcuts

Imagine life without a mouse. We’re not talking about furry little rodents or that famous cartoon character from the funnest place on Earth. No, we’re talking about that gizmo that’s plugged into your computer that you use to click buttons and navigate around web applications like Service Cloud.
A graphic of a mouse cartoon

Of course, a mouse is helpful. But sometimes a mouse can slow down your support agents, especially when they’re completing repetitive tasks, such as opening or closing console tabs. Sometimes it’s faster to press a key on a keyboard—hence, the term shortcut—instead of moving a mouse around with your wrist atop a plastic mouse pad, and then trying to figure out which of its buttons you should click with your fingers.

Explore Default Keyboard Shortcuts

Some keyboard shortcuts are automatically turned on in a console. In other words, your support team can immediately start using shortcuts to close cases faster. Let’s check out these default keyboard shortcuts.

Go to the Sample Console that you created in a previous unit by clicking Sample Console from the App Picker. In the console, click Console drop-down icon and select Show Keyboard Shortcuts. A convenient overlay appears. Like a map, the overlay shows you existing standard shortcuts and how to use them. If shortcuts look dimmed, it means they haven’t been turned on or they’ve been customized by an administrator.
A screen shot of the show keyboard shortcuts overlay

Look closely at some of the standard shortcuts in the overlay. Do you notice any themes? You might notice the themes of moving and editing. The standard shortcuts let you press keys to focus your movements inside a console or edit records in a console. Depending on your support agents’ workflow, they might never need to use a mouse again with a console, as long as you provide them with all the right shortcuts.

Note

Note

The information in this unit is about keyboard shortcuts for console apps in Salesforce Classic. For information on other keyboard shortcuts, see Keyboard Shortcuts in the online help.

Turn On Keyboard Shortcuts

Many keyboard shortcuts are on by default, but others must be enabled. To see how simple it is to turn on a shortcut, let’s turn on one of the most useful standard shortcuts: Show Keyboard Shortcuts. Sure, you can click Console drop-down icon and select Show Keyboard Shortcuts, but why spend extra time moving a mouse around with your wrist and fingers when you can press a key in half the time? Plus, with over 18 standard shortcuts turned on by default, and 10 more shortcuts that you can turn on at any time, having the Show Keyboard Shortcuts at your fingertips is helpful.
  1. From Setup, enter Apps in the Quick Find box, then select Apps.
  2. Next to the Sample Console, click Edit.
  3. Click Customize Keyboard Shortcuts.
    A screen shot of the customize keyboard shortcuts link in setup
  4. Click Edit.
    A screen shot of the console keyboard setup page
  5. Select show keyboard shortcuts, and remember the corresponding key command SHIFT+K.
  6. Click Save.
  7. Click Back to Sample Console.
  8. Press SHIFT+K. Notice that the Show Keyboard Shortcuts overlay appears?
    A screen shot of the show keyboard shortcut overlay with SHIFT+K as an option

And that’s how you turn on any of the standard keyboard shortcuts that aren’t on by default. You can follow the same tasks to turn off keyboard shortcuts too, but you probably figured that out already. The next question you may be asking is, “But what if I want to change or customize an existing shortcut?” Let’s do that now. It’s simple.

Customize Standard Keyboard Shortcuts

Let’s say you’ve asked your support team which keyboard shortcuts they use most. Most of your support agents say they love how shortcuts have increased their productivity by reducing mouse clicks, but they don’t like some of the key combinations. You’re a little surprised to hear that pressing O is more difficult than pressing K, but it’s your job to help.

Your support team tells you that they want to change the Show Keyboard Shortcuts command from SHIFT+K to SHIFT+U. Knowing that this is very easy to do, you agree to make the change, but you negotiate a cup of coffee and a cookie (the yummy kind) out of them first.
  1. From Setup, enter Apps in the Quick Find box, then select Apps.
  2. Next to the Sample Console, click Edit.
  3. Click Customize Keyboard Shortcuts.
  4. Click Edit.
    A screen shot of the console keyboard setup page
  5. Next to show keyboard shortcuts, click Edit.
  6. In Key Command, type SHIFT+U, then click OK.
    A screen shot of customize standard shortcut overlay in setup
  7. Click Save.
  8. Click Back to Sample Console.
  9. Press SHIFT+U.
    Notice that the Show Keyboard Shortcuts overlay appears, and SHIFT+U is displayed in the overlay as the customized shortcut.
    A screen shot of the keyboard shortcut overlay with SHIFT+U in the overlay as a shortcut
Tip

Tip

After you customize shortcuts, notify console users about the updates, otherwise they might have no idea about the terrific changes you’ve made to help them.

You now know how easy it is to customize standard keyboard shortcuts, but you might be thinking it’s time to see how to create a shortcut from scratch. Let’s cover that next.

Create Custom Keyboard Shortcuts

We’re not going to dodge the issue. Creating custom keyboard shortcuts from scratch is a little more challenging, unless you’re familiar with coding. Since we’re assuming that code and things named the Service Cloud Console Integration Toolkit (Console API) sound a little intimidating to you, we’re not going to actually create a shortcut. But the process to do so isn’t that hard. And we’re going to walk you through what someone with a bit of a developer experience could do to create a custom shortcut. Our custom shortcut will let console users log out of Salesforce by pressing a key.

The high-level steps to create a custom shortcut are this simple:
  1. You create a custom shortcut similarly to how you edit a standard shortcut.
  2. A developer codes a “listener” in a Visualforce page that details the new shortcut’s logic.
  3. You add the listener to a custom console component so that it’s available to a console.
  4. You add the custom console component to a console’s footer so that users can trigger the new shortcut.
  1. Create the custom shortcut similarly to how you edit a standard shortcut.
    1. From Setup, enter Apps in the Quick Find box, then select Apps.
    2. Next to the Sample Console, click Edit.
    3. Click Customize Keyboard Shortcuts.
    4. Click Edit.
    5. Click +Add Keyboard Shortcut.
    6. Add shortcut details, and remember the Console Event Name and Key Command, as you’ll send those to a developer who codes some magic.
      A screen shot of adding a custom keyboard shortcut in setup
  2. A developer codes a “listener” in a Visualforce page that listens for users’ requests to trigger the keyboard shortcut.

    Whoa, that might sound strange, but it’s just a bit of code added to Salesforce to turn the logout shortcut you created into a reality.

  3. Add the listener to a custom console component so that it’s available for a console.
    Tip

    Tip

    Remember custom console components? In the Service Cloud Basics module, we created a custom console component to show data in a console’s sidebar, but this time we’re creating a component in the console’s footer to add our listener code. We’re also hiding the component so that it works but isn’t visible to users because they don’t need to see data for a keyboard shortcut.

    Shakespeare wrote: “To be or not to be, that is the question.” But a savvy console administrator asks, “To add a component to a page layout or the footer, that is the question.” Page layouts display components alongside records, whereas a footer displays components no matter which records appear.

    1. From Setup, enter Custom Console Components in the Quick Find box, then select Custom Console Components.
    2. Click New.
    3. Create a new component named ShortcutsListener, mark it as Hidden, and associate it with the Visualforce page that includes the listener created by your developer.
      A screen shot of adding a custom console component to the footer for a keyboard shortcut
    4. Click Save.
  4. Add the listener component to a console footer’s for the custom shortcut to work when triggered by users.
    1. From Setup, enter Apps in the Quick Find box, then select Apps.
    2. Next to the Sample Console, click Edit.
    3. In Choose Custom Console Components, add the new ShortcutsListener component.
      A screen shot of the choose console components field in setup with ShortcutListener selected
    4. Click Save.

And that’s how you create a custom keyboard shortcut. If you tried to add the custom shortcut to your Sample Console, next time you return to it, click SHIFT+S, and you’ll log yourself out of Salesforce without using a mouse. Now that you’ve gone through the process of creating a keyboard shortcut, it’s probably easier than you thought!