sodcalculator

10 Tech How-To

Custom Keyboard Shortcuts for Windows: How to Assign Them

Guide 10-48417 · Updated · Step by step

This guide shows you how to assign custom keyboard shortcuts to launch any Windows application, document, or folder. You’ll learn the built-in method that works for most programs, plus a more flexible technique for anything else. No extra software is required, just a few minutes and a desktop shortcut.

What You’ll Need

  • A Windows PC (Windows 10 or Windows 11)
  • The program, file, or folder you want to launch
  • Administrator rights are not required for the standard method

Step-by-Step

  1. Create a desktop shortcut for the item you want to launch. Right-click the program’s .exe file (or the document/folder), then select Send to > Desktop (create shortcut). If you’re using a Microsoft Store app, you may need to drag it from the Start menu to the desktop instead.
  2. Right-click the shortcut on your desktop and choose Properties from the context menu.
  3. Go to the Shortcut tab (it’s usually the first tab). Look for the field labeled Shortcut key.
  4. Click inside the Shortcut key field and press the key combination you want to use. Windows automatically adds Ctrl + Alt as a prefix. For example, if you press P, the field will show Ctrl + Alt + P. You can also use other combinations like Ctrl + Shift + P or Ctrl + Alt + Shift + P by pressing those keys together.
  5. Click Apply, then OK to save the shortcut.
  6. Test your shortcut. Press the combination you set. The program, file, or folder should open immediately, even if the desktop is not visible.

That’s the core method. But it only works for shortcuts on the desktop (or in the Start menu folder that maps to the desktop). If you want to assign a shortcut to a program that doesn’t have a desktop shortcut, or you want a shortcut that works even when the desktop shortcut is deleted, you can use a small script or a third-party tool. Here’s a more advanced approach using a simple AutoHotkey script:

  1. Download and install AutoHotkey (free and open source) from the official website.
  2. Create a new text file and rename it to something like shortcuts.ahk.
  3. Right-click the file and choose Edit Script. Add lines like this, one per shortcut:
    ^!p::Run, "C:\Path\To\Program.exe"
    Here ^ means Ctrl, ! means Alt, and p is the letter. So ^!p becomes Ctrl+Alt+P. Use # for Windows key, + for Shift.
  4. Save the file and double-click it to run the script. Your custom shortcuts are now active. To make them start with Windows, place a shortcut to the .ahk file in the Startup folder (press Win+R, type shell:startup, and press Enter).

Common Mistakes

  • Using a shortcut that already exists. Windows will not warn you if the combination is taken by another program or system function. For example, Ctrl+Alt+Delete is reserved and cannot be overridden.
  • Setting a shortcut on a shortcut that is not on the desktop. The Shortcut key field only works for shortcuts located on the desktop or in the desktop’s special folder. If you use a shortcut from a different folder, the field will be grayed out or ignored.
  • Forgetting to include the Ctrl+Alt prefix. When you type a single letter, Windows adds Ctrl+Alt automatically. If you type a combination without Ctrl+Alt (like Shift+F), it may not register correctly.
  • Using the numeric keypad. Some keyboard shortcuts don’t work with the numeric keypad numbers; use the top row numbers instead.
  • Not testing after locking the screen. Some shortcuts may not work on the login screen, which is a security feature.

Tips

  • Choose memorable combinations that relate to the app. For example, Ctrl+Alt+N for Notepad, Ctrl+Alt+E for Excel.
  • Use Ctrl+Shift instead of Ctrl+Alt if you find that Ctrl+Alt conflicts with language switching or other system shortcuts.
  • Keep a list of your custom shortcuts in a text file so you don’t forget them.
  • For frequently used folders, you can also pin them to File Explorer’s Quick Access, but a keyboard shortcut is faster.
  • If you use the AutoHotkey method, you can add many shortcuts in one script and even make the script reload with a hotkey (e.g., Ctrl+Alt+R).

Troubleshooting

  • Shortcut doesn’t work at all: First, check that the desktop shortcut still exists. If you deleted it, the shortcut key stops working. Also, make sure you pressed Apply before closing Properties.
  • Shortcut opens the wrong thing: This usually means the combination is already assigned to another shortcut. Change your combination to something else.
  • Shortcut works only when desktop is visible: That’s normal. The built-in method works globally, but if you have a full-screen game or app running, it may block it. The AutoHotkey method works more reliably in that case.
  • Shortcut key field is grayed out: The shortcut is not on the desktop. Move it to the desktop, or use the AutoHotkey method.
  • AutoHotkey script not running: Make sure you have AutoHotkey installed and that the script file has the .ahk extension. Double-click the script to test it. If it still doesn’t work, check the file path in the script is correct and uses double quotes.

Frequently Asked Questions

Can I assign a shortcut to a Microsoft Store app?

Yes, but you first need to create a desktop shortcut for it. In Windows 10/11, you can drag the app from the Start menu’s All Apps list to the desktop. Then follow the same steps.

Why does Windows force Ctrl+Alt as the prefix?

It’s a safety measure to avoid conflicts with common shortcuts like Ctrl+C (copy) or Ctrl+V (paste). The prefix ensures your custom shortcut is less likely to clash with existing system functions.

Can I use the Windows key in a shortcut?

In the built-in method, no. The Shortcut key field only accepts Ctrl+Alt, Ctrl+Shift, or Ctrl+Alt+Shift combinations. For Windows key shortcuts, you need the AutoHotkey method (using # in the script).

Will my custom shortcuts work after I restart my computer?

Yes, the built-in method persists as long as the desktop shortcut exists. The AutoHotkey method requires the script to be running, so place it in the Startup folder to have it launch automatically.

Can I assign a shortcut to open a specific file, like a Word document?

Yes, create a desktop shortcut to the file itself, then set the shortcut key. The file will open with its default program.

Is there a way to remove a custom shortcut?

Yes, go back to the shortcut’s Properties, clear the Shortcut key field (select the text and press Backspace), then click Apply. For AutoHotkey, just remove the line from the script and reload it.

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

The whole Tech How-To bed →