Custom keyboard shortcuts let you launch apps, run scripts, or insert text with a single key combination, saving you from repetitive mouse clicks. This guide covers how to create them on both Windows 11 and macOS, using built-in tools only—no third-party software required.
What You’ll Need
- A Windows 11 PC or a Mac running macOS (any recent version).
- For Windows: a shortcut to the app, file, or folder you want to assign a hotkey to.
- For macOS: a basic understanding of System Settings (or System Preferences on older versions).
Step-by-Step
Windows 11: Create a Shortcut for an App or File
- Right-click on the desktop (or in File Explorer) and select New > Shortcut.
- In the location field, type the full path to the app executable (e.g.,
C:\Program Files\Notepad++\notepad++.exe) or click Browse to find it. For a website, enter the URL (e.g.,https://example.com). Click Next. - Give the shortcut a name (e.g., “Notepad++”) and click Finish. You now have a shortcut icon on your desktop.
- Right-click the new shortcut and select Properties.
- Go to the Shortcut tab. Click in the Shortcut key field.
- Press the key combination you want to use. Windows automatically adds Ctrl + Alt as a prefix. For example, pressing N will set the shortcut to Ctrl + Alt + N. You can also use Ctrl + Shift or Ctrl + Alt + Shift by pressing those keys together with a letter.
- Click Apply and then OK. Your custom shortcut is now active. Test it by pressing the combination anywhere in Windows.
Windows 11: Create a Shortcut for a Script or Command
- Create a batch file (e.g.,
myscript.bat) or a PowerShell script (e.g.,myscript.ps1) with the commands you want to run. - Right-click the script file and select Create shortcut (or create a shortcut manually as above, pointing to the script file).
- Right-click the shortcut and select Properties.
- In the Target field, you may need to prepend the interpreter. For a PowerShell script, change the target to something like:
powershell.exe -ExecutionPolicy Bypass -File "C:\path\to\script.ps1". For a batch file, just the path is fine. - Set the Shortcut key as described above.
- Click Apply and OK.
macOS: Create a Shortcut for an App or Command
- Open System Settings (or System Preferences on older macOS).
- Click Keyboard, then select the Keyboard Shortcuts tab (or button).
- In the left sidebar, click App Shortcuts.
- Click the + button to add a new shortcut.
- In the dropdown next to Application, choose All Applications to apply the shortcut globally, or select a specific app (e.g., Safari, Notes).
- In the Menu Title field, type the exact menu command name as it appears in the app’s menu bar. For example, to create a shortcut for “Copy”, type
Copy. The text must match exactly, including capitalization and ellipses (…). - Click in the Keyboard Shortcut field and press the key combination you want. Use a modifier like Command, Option, or Control plus a letter or number. Avoid using combinations that already exist in the app.
- Click Add. The shortcut is now active.
macOS: Create a Shortcut for a Script or Service
- Open Automator (or Shortcuts app on newer macOS) and create a new Quick Action (formerly called Service).
- Add actions like “Run Shell Script” or “Launch Application”. Configure the script or app you want to run.
- Save the Quick Action with a descriptive name (e.g., “Open Terminal Here”).
- Go to System Settings > Keyboard > Keyboard Shortcuts > Services.
- Find your Quick Action under the appropriate category (e.g., “General”).
- Click the right side of the row to reveal a shortcut field, then press your desired key combination.
- Close the settings window. The shortcut is now active.
Common Mistakes
- Using an existing shortcut: On Windows, if you pick a combination that’s already used by the system or an app, your shortcut may not work or may conflict. On macOS, the system may ignore your custom shortcut if it conflicts with a built-in one.
- Incorrect menu title on macOS: The menu title must match exactly, including spaces and ellipses. For example, “Save As…” is not the same as “Save As”.
- Forgetting to apply on Windows: If you don’t click Apply before closing Properties, the shortcut won’t be saved.
- Using function keys alone: On Windows, the shortcut key field only accepts combinations with Ctrl, Alt, and/or Shift. Pressing just F5 won’t work.
- Creating a shortcut for a UWP app: Some Windows Store apps cannot be assigned keyboard shortcuts via the desktop shortcut method.
Tips
- Use memorable combinations: Pick shortcuts that relate to the action, like Ctrl+Alt+N for Notepad, or Cmd+Shift+T for Terminal.
- Test after creating: Always test your new shortcut immediately to ensure it works as expected.
- Keep a list: Write down your custom shortcuts somewhere, or use a notes app, so you don’t forget them.
- Use Windows PowerToys for advanced options: If you need more flexibility (like remapping keys or creating shortcuts for text snippets), PowerToys Keyboard Manager is a free Microsoft tool that extends the built-in capabilities.
- On macOS, use the Shortcuts app for complex automations: For multi-step workflows, the Shortcuts app (macOS Monterey and later) offers more power than simple menu shortcuts.
Troubleshooting
- Shortcut doesn’t work: First, check if the shortcut conflicts with another app. Temporarily disable the other app or change your shortcut. On Windows, also verify that the shortcut target is valid and the file hasn’t been moved.
- Windows shortcut only works when the desktop is active: This is expected. Desktop shortcuts only work when no other app has focus. To make a global shortcut, you’d need a third-party tool like AutoHotkey.
- macOS shortcut not appearing: Make sure you clicked Add after setting the shortcut. Also, check that the menu title is exactly correct—try copying it from the app’s menu bar.
- macOS shortcut works but also triggers the original action: This happens when the shortcut conflicts with a system shortcut. Change your custom shortcut to a different combination.
- Windows shortcut opens the Properties window instead of the app: This can happen if you press the shortcut while the shortcut icon is selected on the desktop. Use the shortcut from within any app window instead.
- Script shortcut on Windows runs but does nothing: Check the script’s execution policy for PowerShell. Run
Set-ExecutionPolicy -Scope CurrentUser RemoteSignedin an elevated PowerShell to allow local scripts.
Frequently Asked Questions
Can I create a shortcut that types a specific text or phrase?
On Windows, you can use PowerToys’ Text Extender (or AutoHotkey) to expand abbreviations into full text. On macOS, go to System Settings > Keyboard > Text Replacements and add a replacement like “brb” → “be right back”.
Why does my Windows shortcut only work when I’m on the desktop?
Desktop shortcuts are only active when the desktop is in focus. To create a global hotkey that works in any app, you need a third-party tool like AutoHotkey or PowerToys Keyboard Manager.
Can I use the Windows key as part of a custom shortcut?
No, the built-in shortcut key field in Windows does not allow the Windows key. You can use Ctrl, Alt, and Shift combinations. For Windows key shortcuts, use PowerToys or AutoHotkey.
How do I remove a custom shortcut on macOS?
Go to System Settings > Keyboard > Keyboard Shortcuts > App Shortcuts, select the shortcut, and click the minus (-) button.
Can I assign a shortcut to a specific browser bookmark?
Yes, on both platforms. On Windows, create a shortcut to the bookmark URL and assign a hotkey. On macOS, you can use the App Shortcuts feature with the browser’s menu command (e.g., “Bookmark This Tab…”).
What if my desired shortcut is already used by the system?
You can override system shortcuts on macOS by adding an App Shortcut with the same menu title, but it may not work for all system functions. On Windows, you cannot override system shortcuts without third-party tools.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Disable Autocorrect on iPhone or iPad: Quick Guide
- Restore Windows 11 Display Scaling to Recommended
- Semiconductor Cycle: How Investors Track It0.0
- Microsoft Store Error 0x80073d12: Fixes That Work
- View Notification Count on iPhone: Full Guide
- How to Start and Navigate a PowerPoint Slideshow