How To Assign Keyboard Shortcuts For OS X Apps

As much as the trackpad is powerful on Mac, I still prefer not to leave the keyboard if I can. For that reason, I want to assign keyboard shortcuts to the rare few apps that deserve it. Imagine my surprise when I realized it’s not a straight forward action in OS X!

In this post I describe how to assign arbitrary keyboard shortcuts to launch OS X apps, without any third-party software or AppleScript. The solution is based on creating an Automator Service workflow to launch the desired app, and assigning a keyboard shortcut to that service.

I imagine there are simpler solutions that take advantage of some third party automation software or AppleScript. Feel free to let me know about your preferred solution, even if it involves such demons.

I am aware that I can use Spotlight to launch any application by typing the first letters of its name. Indeed, this is how I launch 99% of apps. There are very few cases where it makes sense to bypass Spotlight with a shorter key-combo – and this post is for these cases.

This is part of my Mac Power User Training series. Follow it to see how I try to go from Mac novice to a pro.

I was surprised to learn that there is no built-in simple way to assign keyboard shortcuts to OS X apps…

The described solution was tested on OS X Yosemite (10.10.1), but is probably applicable to other versions as well.

Solution overview

  1. Create an automator service workflow that just launches the target app.
  2. Assign a global keyboard shortcut for the service.

Creating a Service Automator Workflow

Start by launching Automator and create a new Service:

Our service receives “no input”, and should be available in “any application”. Add the “Launch Application” action, and choose the target application. Save the service.

Assigning a keyboard shortcut to the service

Once our service exists, we can now assign a keyboard shortcut to run it!

In the System Preferences app, open the Keyboard settings. Navigate to the Shortcuts tab, and choose Services on the left panel. Locate the service we just created in the right panel (should be under General), enable it, and click to edit the keyboard shortcut associated with it.

That’s it. Just be sure to pick a unique-enough key-combo. Usually, native app-shortcuts will override global shortcuts. If you’re in an app that uses the key-combo you chose, it will take over your global shortcut. I guess it’s a trial-and-error thing…

Summary

That’s the “simplest” solution I came up with for assigning a keyboard shortcut to launch an OS X app.

I still consider myself pretty new to OS X, so I might be missing the trivial solution that is built-in into the system. If I am, I’d love to find out about it, so do let me know in the comments!

Assign a keyboard shortcut to launch an OS X app using Automator and Service keyboard shortcuts!

No Comments Yet.

Leave a Reply