How to disable a keyboard key in Windows 10

The keyboards come in all kinds of designs. Some have more keys than others and you may find these keys useful or not. The point is that, even if you don't use a key on your keyboard, it's still there. You can reassign that key, but if you prefer that you do nothing, you can disable it. Here we teach you to deactivate a key on your keyboard.

How to deactivate a key on the keyboard

When it comes to changing the operation of a key on the Windows 10 keyboard, the application for the job is AutoHotKey. The small scripting utility is not just to change how a key is executed or what it does.

It can also be used with the same ease to disable a key. In fact, it is one of the easiest things to do when it comes to writing a script.

Similarly, the only part that is a bit complicated is to discover how to identify it in an AHK script. AutoHotKey has extensive documentation available on how to declare keys. Once you know how to identify the key in the script, you can type it.

Now, open a new Notepad file, enter the following:

CapsLock :: return

The above will disable the Caps Lock key. Now, if you need to deactivate a different key, all you have to do is change the one declared at the beginning of the script. to be precise, it will replace the «CapsLock» bit. Save it with the AHK file extension and then run it. Also, while the script is running, the key you have declared will not work.

Disable keys permanently

If you need a key to always be disabled, but you don't want to be bothered to run it every time you start your system, you can create a shortcut to the AHK script and add it to the Startup folder. Or you can simply move the original script file to the startup folder. Both options will do the trick.

You can also declare and disable as many keys as you want in just one script. You simply have to move to another line and enter the key you want to deactivate. Followed by the key, type two dots twice, followed by the word «return».

This will deactivate the key after you have booted on the desktop. While on the home screen, the login screen or in the BIOS, the key will continue to work. This is because neither the script nor AutoHotKey are running. So this is a software solution and not hardware.