Updated
How to Press a Keyboard Shortcut with Shortcuts on Mac
By Sindre Sorhus, who makes the Shortcutie app
With Shortcutie
- Install Shortcutie, and open it once. It asks for Accessibility access, which it needs to press keys.
- In your shortcut, add the “Press Keyboard Shortcut” action of Shortcutie.
- Type the key in the field after “Character”, like
n. - Turn on the modifier keys of the shortcut: “Command”, “Option”, “Control”, or “Shift”.
- Optional: expand the action, and choose the app that gets the keys in “Target App”. When it is empty, the keys go to the app in front, like when you press them.
If the target app does not react, turn on “Activate App”, so the app comes to the front first.
Tips
- For a key without a character, like Return, Esc, an arrow key, or a function key, change “Character” to “Special Key”, and choose the key.
- The action uses the positions of the keys, like macOS does for shortcuts. For a key of another keyboard layout, like “ø”, change “Character” to “Key Code”, and type the code of the key.
- The Fn key is not supported.
- To click a menu item instead, which is more reliable when the shortcut of the item changes, use the “Trigger Menu Bar Item” action.
Get Shortcutie
Power up the Shortcuts app on Mac
$10, one-time purchase, plus tax where applicable
- Requires
- macOS 26 or later
- Privacy
- No personal data collected
- License
- All your Macs
- Updated
- September 2026
- Gumroad rating
- 4.9/5 (27 ratings)
Without an app
The “Run AppleScript” action of Shortcuts can press keys with System Events:
- In your shortcut, add the “Run AppleScript” action.
- Replace the text in the action with
tell application "System Events" to keystroke "n" using {shift down, command down}, with your key and modifier keys. - If the shortcut cannot run the script, choose click “Advanced”, and turn on “Allow Running Scripts”.
- Run the shortcut. The first time, macOS asks for Accessibility access. Allow it in “System Settings Privacy & Security Accessibility”.
keystroke types characters. For a key without a character, use key code with the number of the key, like key code 36 for Return. This works, but the script is harder to change than the fields of an action.
