Monday 2 December 2019

How to disable keys with Auto Hot Key

If you don't have Auto Hot Key installed download and install it in your system. This software is designed only for windows. It is free and opensource.

The next step is to pick out which keys you want to disable. Visit the AutoHotKey website to find a list of all supported keys.

Next, open Notepad. In a blank document, type the key’s reference name followed by “::return”. For the sake of this example, we want to disable the Left Control key. Here's how it will look:
If you want to disable more than one, repeat this same one-liner, on a new line, for each additional key.

Then, save the script with “.ahk” extension. This is very important. Saving file as an AHK lets your system know that it’s intended to be compiled and run by AutoHotKey. You should see that the file’s icon has an “H” on it, meaning it’s associated with AutoHotKey.

Now double click on the file to run it. You will see auto hot key icon on your task-bar's system tray. If you want to close the script, find the icon form system tray, right click over it and hit Exit.

Running The Script on Startup

Now that you’ve got your script working, you may want it to automatically start with Windows. Press the Windows + R keys to bring up the Window’s Run prompt. Type "shell:common startup" in the text box and click OK. This will open windows startup page.

windows startup folder location

Copy the script here and close the window. From now on the script will start automatically when your PC boots.