How To Change Keyboard Shortcut?
What if there was a way to navigate the OS more efficiently? Using keyboard shortcuts, you can access a lot of Windows OS’ features even faster. But, one catch is that you must remember all these shortcut keys.
However, you can take it a step further by setting your own customized shortcut keys. By changing the keyboard shortcut according to your preference, you do not need to memorize any shortcuts.
Today, we have brought forth this article to give you a step-by-step guide on changing keyboard shortcuts. So, without further ado, let us get right into it.
How to Change Keyboard Shortcut in Windows?
Windows, as of yet, does not have a built-in feature to change the keyboard shortcuts. This is where a scripting language named AutoHotKey comes in.
AutoHotKey is an open-source scripting language for Windows. Using AutoHotKey, you can create instructions that will complete certain tasks. Not only this, it allows users to complete tasks requiring repetitive mouse and keyboard movement and button clicks.
As you need to create your scripts, you will require some programming knowledge if you want to use AHK to its full capability. However, changing keyboard shortcuts is fairly simple, and any user can easily write scripts to change shortcuts.
This article only explains the steps to change keyboard shortcuts. If you want to learn all the things the AHK can do, please refer to AHK’s Official Documentation.
Setting Up AutoHotKey
Once you know basic AHK syntax, all you need to do is create an AHK file and start writing the scripts. You can download the application from AutoHotKey’s Official Website. Once you download the executable
(.exe) file, install the application.
After the installation process is complete, follow the steps below to write the script to change the keyboard shortcut.
- Right-click on the desktop and click on New.
- Select AutoHotKey Script.
- Rename the newly created file.
- Right-click on this file, select Open with and click on Choose another app.
- Select Notepad and click on OK.
- Once the file with the
.ahkextension opens on the notepad, it is time to write the actual script.
Note: Once you open the file, you should see some pre-written codes. You can delete or ignore them and start writing the code.
AutoHotKey Basic Syntax
As discussed above, you need to know some basic AHK syntax. Before we get into writing the actual scripts to change Window shortcuts, let us see what some of the AHK syntax you need to use to write the script.
|AHK Syntax Representation||Keys on Keyboard|
|Run||To open a File|
|<^||Left Ctrl key|
|>^||Right Ctrl Key|
|<+||Left Shift Key|
|>+||Right Shift Key|
|<!||Left Alt Key|
|>!||Right Alt Key|
|<#||Left Windows key|
|>#||Right Windows key|
These are only some of the common key syntax you will require to write the script. If you want to know the syntax of the keys other than the above-listed ones, you can check all the syntax in AHK’s key list documentation.
AutoHotKey Script to Change Shortcut
The script to replace existing shortcut keys consists of three parts. First is the key combination you want to use as a shortcut. The second one is the operation code. And finally, the last one is the operation you want to perform using the key combination.
^e:: Send #e
The above syntax is composed of three parts. The first one is the
^e. This represents the new shortcut key that you need to press to perform an action.
^ means Ctrl key, and
e is the key itself. So,
^e means Ctrl + E.
Anything left of the sign
:: is the default key combination that may perform any task. Here, we have used
Send to let the script know that it needs to perform the shortcut operation that comes next.
Finally, we have
#e. This means Win + E by default, and it opens File Explorer.
When you run the script, it waits for input. When you press Ctrl + E, it performs the task of Win + E and opens Windows Explorer. If you want to change other shortcut keys, you write the new script in a new line.
Using this simple syntax, you can change the shortcut to any of the default shortcut keys according to your choice. You can also add
#NoTrayIcon at the end of the script. NoTrayIcon removes the AHK tray icon from the Taskbar.
AutoHotKey Syntax to Run a File
Taking it a step further, you can also use the shortcut key to open or run a file or open a folder. However, this script is slightly different compared to the previous syntax. To open a file, you first need to know the file’s actual location.
- Right-click on the file and select Properties.
- Go to the Shortcut tab.
- The target represents the file location.
Once you know the file location, here is a syntax that you need to open this file using the shortcut key.
#a:: run “<file location>”
<file location> with the actual location of the file.
#a represents Ctrl + A. This is the key combination that you need to press.
run is the operation code that tells the computer to open the file depending on the file location.
Once you write the script, save and close the notepad.
Running AutoHotKey Script
In order to run the AHK script that you just wrote, all you need to do is run the AutoHotkey file with the
.ahk extension. Double-click on the file, and the script will run in the background. You can also make the file run automatically on startup.
Follow the steps mentioned below to run the AHK script on startup.
- Copy the script file with the
- Press the Windows + R key to open Run.
shell:startupand press Enter. A Windows Explorer window should open.
- Paste the script file.
Now, the PC will run the script automatically once the PC turns on.
Turn Off AutoHotKey Script
You can end AutoHotKey from the background process to turn off the AHK script. However, you can also disable it using the tray icon menu.
- Expand the tray icon and right-click on the AHK icon.
- Here, you have the option to reload, edit, pause, and suspend the AHK script.
Change Keyboard Shortcut Using Companion Application
Most premium keyboard comes with a dedicated application to control keyboard settings. And if you are using a keyboard from reputed companies like Corsair, Razer, or Logitech, you can even use its companion application to change keyboard shortcuts.
Below, we have explained the steps to change keyboard shortcut keys in Corsair and Razer keyboards. Before we get into the steps, remember that the manufacturer’s companion application may not support your device.
Even if you have a keyboard from the same manufacturer, it’s OEM (Original Equipment Manufacturer) software for your peripheral may differ from the one in use.
For Corsair Keyboard
Using Corsairs iCue, you can control most Corsair products. You can even remap your mouse buttons. As for keyboards, you can use a single key or set of keys to perform the desired action. To change keyboard shortcuts using Corsair iCue,
- Download iCue from the official Corsair download center and install it.
- Run the application and click on the keyboard image on the top of the iCue window.
- Select Key Assignment.
- Under Assignments, click on the + icon.
- Select the action you want to perform using a keystroke under Assignment Type.
- Under the Key section, click on the box to record a key press.
- Finally under Remap: Keystroke, set a shortcut key
For Razer Keyboard
Razer products use Razer Synapse as its companion application. Using global shortcuts, you can adjust shortcut keys to switch device profile, switch sensitivity, lighting, launch programs, and even change Windows shortcuts.
However, as with any companion application, it may or may not support your Razer keyboard.
- Download Razer Synapse and install the application.
- Run Razer Synapse.
- Click on Global Shortcuts.
- Click on Add a Shortcut.
- Here, select the action you want to perform using the shortcut keys.
- Click on Save.
- Now, enter a shortcut key.
Once you are done, your Razer keyboard will perform the action once you press the selected shortcut key.
Change Keyboard Shortcuts on macOS
Unlike Windows, macOS offers a built-in feature that you can use to create your own shortcut keys. Using macOS shortcut settings, you can not only change the shortcuts in the OS but also shortcuts in the application itself.
- Click on the Apple icon on the top left of the screen and go to System Preference.
- Select Keyboard and go to the Shortcuts tab.
- On the left panel, click on Mission Control.
- On the right panel, tick the shortcut you want to change
- Double click on the shortcut that you want to change.
- Press the new key combination and press OK.
- If you want to restore all the changes, click on Restore Defaults.
You can also change shortcut keys on specific application. To do this,
- Go to System Preference > Keyboard > Shortcuts > App Shortcuts.
- Click on the + sign to add new shortcut.
- Select the application, type a name for the shortcut on Menu Title and the shortcut key combination.
- Now click on Add. The shortcut should now be in affect once you open said application.