If you are using a Windows app that has a keyboard shortcut you don’t like, you can use AutoHotKey to create a new hotkey and forward it to the one you don’t like. This is useful if you use a keyboard without a full layout, or maybe you have a hand injury, disability, or you simply use a non-qwerty keyboard layout like Dvorak or Colemak.
For example, you want to use the keyboard shortcut Ctrl
+Win
+Space
but that’s really awkward for you. Maybe you would rather use Ctrl
+Space
instead.
No problem. Download and install the open-source tool AutoHotKey. It’s a free scripting language made for creating hotkeys and automation.
Once installed, create a new text file and give it a name ending in the .ahk
extension. For example, myhotkeys.ahk
in your Documents or Desktop folder. The Desktop folder may be more convenient if you expect to add or update hotkeys in the future.
Right-click the file and select Edit from the context menu to open it in Notepad. Paste the following script in and save it. This script will press the Ctrl
+Win
+Space
shortcut for you whenever you press Ctrl
+Space
:
^Space:: ; Triggers when Ctrl+Space pressed
KeyWait, Control ; Wait for Ctrl key to be released
KeyWait, Space ; Wait for Space key to be released
Send {LWin down} ; Simulate Win key held down
Send {Control down} ; Simulate Ctrl key held down
Send {Space} ; Simulate Spacebar press
Send {Control up} ; Simulate Ctrl key release
Send {LWin up} ; Simulate Win key release
return
Now Every time you press the hotkey alias Ctrl
+Space
, AutoHotKey will press the original hotkey. You can actually press either hotkey, but the one you created is more convenient for you.
Make your script run when you log in
If you’d like to have your AutoHotKey script run whenever you log in to Windows, you can copy a link to the Windows Startup folder. Any apps or links in this folder will be started automatically when you sign in to Windows.
To find your Startup folder, copy the path below to your clipboard:
%appdata%\Microsoft\Windows\Start Menu\Programs\Startup
Now press the Windows key to open Start Menu search, then paste the path and press Enter. Your Startup folder will appear in File Explorer.
Hold down the Alt key and drag the hotkeys.ahk
script (it should have a purple ‘H’ icon) from your desktop to the Startup folder to create a link in the Statup folder. Next time you open Windows, the script will run. And you can edit the file on your desktop without having to find your way back to the Startup folder.
You can create as many keyboard shortcuts as you like, and put them all into one file. For a complete list of keys available in AutoHotKey, see the AutoHotKey KeyList documentation.