Custom Keyboard Shortcuts on Mac: Full Setup Guide
In this article
Yes, you can create custom keyboard shortcuts on a Mac for almost any menu command in any app, and for launching apps or running scripts. The built-in tools in macOS handle most of this without any third-party software. You'll set them up in System Settings (or System Preferences on older macOS), and they work across the system once configured. The steps below cover both app-specific shortcuts and global shortcuts for launching apps, plus how to use the built-in Text Replacements for typing shortcuts.
What You'll Need
- A Mac running macOS (the steps reference System Settings, which is the name used in macOS Ventura and later; on earlier versions it's System Preferences).
- For app-specific shortcuts: the app you want to customize must be installed and have a menu bar with the command you want to remap.
- For launching apps with shortcuts: the app must be in your Applications folder or accessible via Spotlight.
- Optional: a text editor to note the exact menu command names (they must match exactly).
Step-by-Step
Create a Keyboard Shortcut for a Menu Command in Any App
- Open System Settings (Apple menu > System Settings) on macOS Ventura or later, or System Preferences on older versions.
- Click Keyboard in the sidebar (or the Keyboard icon in System Preferences).
- Click the Keyboard Shortcuts button (or the Shortcuts tab).
- In the left column, select App Shortcuts.
- Click the + (plus) button. A dialog appears.
- From the Application dropdown, choose the app you want the shortcut to apply to. Choose All Applications only if you want the shortcut to work in every app that has the exact same menu command name (rare, but possible).
- In the Menu Title field, type the exact name of the menu command as it appears in the app's menu bar. For example, if you want to trigger "File > Save As", type Save As… (including the ellipsis character if present, or just the word without it if the menu shows no dots). You can also use the arrow symbol → to indicate a submenu path, like File→Save As… (type the arrow by pressing Option+Right Arrow, or just copy-paste it).
- Click the Keyboard Shortcut field, then press the key combination you want to assign. For example, press Command+Shift+S. Make sure the combination isn't already used by the system or the app (if it is, macOS may not apply it or may override the existing one).
- Click Add. The shortcut is saved and should work immediately in the target app.
Create a Global Shortcut to Launch an App
macOS doesn't have a built-in way to assign a key combination to launch an app directly, but you can use the built-in Shortcuts app (introduced in macOS Monterey) or a free third-party tool like BetterTouchTool or Karabiner-Elements. Here's the official method using the Shortcuts app:
- Open the Shortcuts app (from Applications or Spotlight).
- Click the + button to create a new shortcut.
- In the search field on the right, type Open App and double-click the Open App action.
- Click the blue App field and choose the app you want to launch.
- Click the shortcut name at the top and give it a name, e.g., "Launch Safari".
- Now go to System Settings > Keyboard > Keyboard Shortcuts > Services (or Shortcuts in older versions).
- Scroll down to the General or Shortcuts section, find your shortcut's name, and click the right side to assign a key combination.
- Press the desired keys (e.g., Option+Command+S) and close the settings. The shortcut will now launch that app from anywhere.
Use Text Replacements for Typing Shortcuts
- Go to System Settings > Keyboard > Text Input (or Text in older versions).
- Click Edit next to Replacements (or the + button in the Text tab).
- Click + to add a new replacement.
- In the Replace field, type a short abbreviation like brb.
- In the With field, type the full text like be right back.
- Click Add and then Done. Now when you type "brb" followed by a space or punctuation, it automatically expands to "be right back" in any app that uses the standard text input system.
Common Mistakes
- Menu title mismatch: The most common issue is typing the menu command name incorrectly. The shortcut won't work if the text doesn't match exactly, including capitalization and punctuation. For example, "Save As…" with an ellipsis is different from "Save As" without it.
- Using a key combination that's already taken: If you assign Command+C (copy) to something else, it will override the system copy command in that app, which can be confusing. Always pick a combination that isn't already used by the app or the system.
- Choosing "All Applications" when you meant one app: If you select "All Applications" and the menu command name exists in many apps, the shortcut will apply everywhere, which might cause unexpected conflicts.
- Forgetting to include submenu paths: If the command is under a submenu (like File > Open Recent), you need to include the submenu name and the arrow symbol, otherwise the shortcut won't find it.
Tips
- Use the Option key in your custom shortcuts to avoid conflicts with standard Command shortcuts.
- If you want a shortcut to work in all apps, but the command name is identical (like "Print"), you can set it for All Applications. Just be aware it will override any existing shortcut for that command in every app.
- For launching apps, consider using Spotlight (Command+Space) and just typing the app name—it's often faster than assigning a custom shortcut.
- Text replacements sync across your Apple devices via iCloud, so you can use the same typing shortcuts on your iPhone and iPad.
- If you need more advanced shortcuts (like multi-step macros), use the Shortcuts app or a third-party tool like BetterTouchTool, which offers deep customization.
Troubleshooting
- Shortcut doesn't work: First, check that the menu command name matches exactly. Open the app, look at the menu bar, and note the exact wording. Also check that the shortcut isn't already used by the system (like Command+Space for Spotlight). Try a different combination.
- Shortcut works only sometimes: If the app has multiple windows or the menu changes contextually, the shortcut may only work when that menu item is available. For example, "Save" might be grayed out if there are no changes.
- Shortcut conflicts with another app: If you set a shortcut for All Applications and it conflicts with a specific app's built-in shortcut, the app's own shortcut usually wins. You can fix this by setting the shortcut only for that specific app.
- Text replacement not expanding: Make sure the replacement is enabled (the checkbox is checked). Also, some apps (like password fields or code editors) may not support text replacements. Try restarting the app after adding a replacement.
- Shortcut launches the wrong app: If you used the Shortcuts app method, ensure the shortcut is named correctly and that you assigned the key combination to the right service. Re-check the Services list.
- After an update, shortcuts stop working: Sometimes macOS updates reset or change settings. Re-apply your custom shortcuts in System Settings. If the app was updated, the menu command name might have changed—update the shortcut accordingly.
Frequently Asked Questions
Can I create a shortcut to paste plain text without formatting?
Yes, but not directly with the built-in App Shortcuts. You can use the Shortcuts app to create a "Copy Plain Text" action and assign a shortcut to it, or use a third-party tool like BetterTouchTool.
How do I remove a custom keyboard shortcut?
Go to System Settings > Keyboard > Keyboard Shortcuts > App Shortcuts, select the shortcut you want to remove, and click the minus (–) button. For text replacements, go to Keyboard > Text Input > Edit and delete the entry.
Can I use function keys (F1, F2, etc.) as custom shortcuts?
Yes, you can assign function keys, but they may conflict with system functions (like brightness or volume). You can change the behavior of function keys in System Settings > Keyboard, but it's often easier to use them with modifiers like Control+Fn+F1.
Will my custom shortcuts work in all versions of macOS?
The steps are similar across recent versions, but the settings location may differ slightly. In macOS Monterey and earlier, it's System Preferences > Keyboard > Shortcuts. In Ventura and later, it's System Settings > Keyboard > Keyboard Shortcuts. The functionality is the same.
Can I set a shortcut to open a specific document or file?
Yes, you can create a Shortcut that opens a file (using the "Open File" action) and assign a key combination to it via the Services menu, similar to the app-launching method described above.
Is there a way to make a shortcut that types a long text string?
Yes, use Text Replacements. Go to System Settings > Keyboard > Text Input > Edit, add a replacement with a short trigger and the full text. It will expand in most text fields.