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 

ahk website

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.

  1. Right-click on the desktop and click on New.
  2. Select AutoHotKey Script.
    create autohotkey script
  3. Rename the newly created file.
  4. Right-click on this file, select Open with and click on Choose another app.
  5. Select Notepad and click on OK.
    open ahk script with notepad
  6. Once the file with the .ahk extension 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
! Alt Key
^ Ctrl Key
+ Shift Key
Up/Down/Left/Right Arrow Keys
Run To open a File
Esc Esc key
Del Delete Key
Tab Tab key
Home Home Key
PgUp/PgDn Pageup/PageDown
Enter Enter key
<^ Left Ctrl key
>^ Right Ctrl Key
<+ Left Shift Key
>+  Right Shift Key
<! Left Alt Key
>! Right Alt Key
# Windows 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.

For example: 

^e:: Send #e

change shortcut keys

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. 

  1. Right-click on the file and select Properties.
  2. Go to the Shortcut tab.
  3. 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>” 

Replace <file location> with the actual location of the file.

shortcut to open 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.

  1. Copy the script file with the .ahk extension.
  2. Press the Windows + R key to open Run.
  3. Type shell:startup and press Enter. A Windows Explorer window should open.
  4. Paste the script file.
    ahk on startup

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.

  1. Expand the tray icon and right-click on the AHK icon.
  2. 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,

  1. Download iCue from the official Corsair download center and install it.
  2. Run the application and click on the keyboard image on the top of the iCue window.
  3. Select Key Assignment.
  4. Under Assignments, click on the + icon.
    add shortcut
  5. Select the action you want to perform using a keystroke under Assignment Type.assignment type keystroke
  6. Under the Key section, click on the box to record a key press.
  7. Finally under Remap: Keystroke, set a shortcut key
    remap keystroke

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.

  1. Download Razer Synapse and install the application.
  2. Run Razer Synapse.
  3. Click on Global Shortcuts.
  4. Click on Add a Shortcut.
    add shortcut razer synapse
  5. Here, select the action you want to perform using the shortcut keys.
    save changed shortcut settings
  6. Click on Save.
  7. Now, enter a shortcut key.choose shortcut key razer synapse

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.

  1. Click on the Apple icon on the top left of the screen and go to System Preference.
    system preference
  2. Select Keyboard and go to the Shortcuts tab.
  3. On the left panel, click on Mission Control.
    change keyboard shortcut mission control
  4. On the right panel, tick the shortcut you want to change
  5. Double click on the shortcut that you want to change.
  6. Press the new key combination and press OK.
  7. If you want to restore all the changes, click on Restore Defaults.

You can also change shortcut keys on specific application. To do this,

  1. Go to System Preference > Keyboard > Shortcuts > App Shortcuts.
  2. Click on the + sign to add new shortcut.
  3. Select the application, type a name for the shortcut on Menu Title and the shortcut key combination.
    change app shortcut mac
  4. Now click on Add. The shortcut should now be in affect once you open said application.

Add a Comment

Your email address will not be published. Required fields are marked *