How to Set Num Lock on permanently

When I use my Windows laptop, I’m always accidentally brushing against the Num Lock key. I suppose it’s because the keys are so flat; I never have this problem on a desktop.

I thought there must be some way to set it so that it’s always on, so I searched for it. First I found articles on how to turn Num Lock on at startup, but that’s not my problem. The key already is on when I start up, but it doesn’t stay on when I brush against it.

Next I found articles say to set a certain registry key. That didn’t work for me, and apparently a lot of other people have the same experience.

Some articles say to edit your BIOS. My understanding is that you can edit the BIOS to permanently disable the key, but I wanted to permanently enable the key.

Here’s what did work: give AutoHotKey the command

    SetNumLockState, AlwaysOn

I haven’t used AutoHotKey before. I’ve heard good things it, but it seems like it can be quite a deep rabbit hole. I intend to look into it a little, but for now I just want my Num Lock to stay on.

After you install AutoHotKey and run it, you get its help browser, not the app per se, and it’s not immediately obvious how to run the code above. You need to save the line of code to a file whose name ends in .ahk, such as numlock.ahk. If you double-click on that file, it will run the AutoHotKey script. To make it run automatically when your computer starts up, put the script in your Startup folder. This is probably

    C:\Users\...\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

You can bring up the Startup folder by typing Windows key + R, then shell:startup.

Related post: Remapping the Caps Lock key

4 thoughts on “How to Set Num Lock on permanently

  1. SteveBrooklineMA

    I had a similar impression of AutoHotKey. Very powerful, flexible, and well-designed by a programmer who takes pride in doing it right. And the vast majority of people who use it probably just need something very simple, like having a single button pushed repeatedly in a video game.

    I’m grateful for the program though. In the past I’ve downloaded programs hoping they would do what I need, but ended up disappointed and frustrated. With AutoHotKey I’m confident it can do it, if I can figure out how.

  2. John,
    Thanks for this. It works and works well!
    Thank you for making my day better!!!

  3. Obviously AHK will work, but for whoever play online games, beware, simply having AHK installed on your computer will trigger EasyAntiCheat or any other similar anticheat and get you banned.

    Do not run AHK if you play online, even if it’s idle or running a script for something totally unrelated.

  4. I always did it in registry base by modifying the value of InitialKeyboardIndicators and setting it to “2”. This doesn’t seem to work anymore (at least on my laptop, maybe it’s valable for desktops) but it still has to be possible via registry. No need for 3rd party apps.

Leave a Reply

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