Creating a hotkey workflow

One type of Alfred v2 Workflows we love is hotkeys. With a hotkey, you can launch an application or file in an instant.

What can I use hotkeys for?

Hotkeys can trigger a wide range of actions:

  • Launch one or more applications, open folders or files with just a hotkey combination
  • Pop up Alfred with a keyword pre-filled
  • Launch a script or AppleScript to perform an action

Creating a hotkey workflow

In this tutorial, I'll create a simple hotkey workflow to launch a few of the applications I use many times a day.

1. Launch Alfred's preferences to the Workflows tab

2. Click the + button in the bottom left of the preferences and select Templates > Files & Apps > Launch file group from hotkey

hotkeys-1.png

3. Double-click the "Hotkey" object and type in the hotkey you want to use. I've set Cmd + Ctrl + i here. Click "Save" to close.

hotkeys-2.png

For more details on the Action and Argument settings in this preference pane, see the Trigger Hotkey object page.

4. Double-click on the object to the right, the "Launch Apps/Files" object.

5. Drop the application, folder or file you'd like to launch with your hotkey. In this case, I've searched for iTunes using Alfred and dragged it directly from Alfred's search results to the dropdown.

hotkeys-3.png
hotkeys-4.png

You can select multiple applications or files to launch at once. For example, if you're editing photos, you may wait iPhoto, Aperture and Safari launched at once, in which case you would simply drag all three to this window.

Click "save" once you've added the applications or files you want to launch.

6. Want to give your workflow a clearer name? Double-click the workflow in the left sidebar to set a name and a description, then click Save.

hotkeys-5.png

I now have a single hotkey launching a single application, so I could stop here. However, I'd like to add more applications and hotkeys to this particular workflow.

7. Click the + button at the top right of the current workflow to add two items:

  • Triggers > Hotkey
  • Action > Launch Apps / Files
hotkeys-6.png

Set the hotkey and choose your application, as per the steps above.

8. Now we need to connect the hotkey to the second object. Hover over the hotkey until it becomes highlighted and a little handle appears on its right side. Click and hold the handle, then keep dragging until a line connects to the second object.

hotkeys-7.png

You can add as many of these hotkeys as you need for your most common applications and files, or you can connect the hotkeys to various other actions.

Return to the Tutorials list for more tutorials, or visit the | Alfred forum for help with creating your own.