How to launch an app using a keyboard shortcut in macOS
In macOS, there are many ways to launch an application. You can click an icon in the Dock or the Launchpad, or type the name of the app in the Spotlight search box. However, in macOS, there is no built-in way to launch an application by pressing a keyboard shortcut.
Using the macOS Automator, you can create a custom service to launch the application of your choice, and bind a keyboard shortcut to it. When you press the keyboard shortcut, the chosen application launches automatically.
Follow the steps below to configure a keyboard shortcut to launch an application in macOS 10.15 Catalina.
Create an Automator service
First, create an Automator service to launch your app.
- In the macOS Finder, open the Applications folder. Double-click Automator.
- If this is the first time you are running Automator, your Automator documents open in a Finder window. Click the New Document button, or double-click the New Document icon.
- Click the Quick Action document type, then click Choose.
- In the Workflow receives current drop-down menu, select no input.
- On the left, Actions from your Actions Library are displayed. Scroll down to Launch Application. Drag this action from the list and drop it in the gray area of the window, as indicated.
- The new action appears on the right, outlined in blue.
- In the Launch Application drop-down menu, select the application you want to launch. If your app is not listed, choose "Other" to locate it manually. In this example, we have chosen the terminal application iTerm.
- Configuration is complete. Open the File menu and choose Save.
- Type a name for your quick action and click Save.
Close the Automator window.
Create a shortcut for the service
Follow these steps to create a keyboard shortcut for your new service.
- Open the Apple menu and choose System Preferences.
- Click Keyboard.
- Click Shortcuts. On the left, click Services. Scroll down to the service you created, and click to select it. Click Add Shortcut.
- A text box opens. Press the desired key combination for your shortcut. In this example, we've held down Command and pressed the backslash key \.
You can choose any combination of Command, Shift, Option/Alt, and the alphanumeric keys. If your chosen shortcut conflicts with an existing shortcut, you will be alerted.
Choose a keyboard shortcut that you do not use in any other application. If you're running another application that uses the same shortcut, your custom shortcut will not work.
- Close the System Preferences. When you press the key combination, your app launches. If your app is already running in the background when you press the shortcut, it comes to the foreground of your other applications.