News, tips, advice, support for Windows, Office, PCs & more
Home icon Home icon Home icon Email icon RSS icon

We're community supported and proud of it!

  • I want to master the numlock key!

    Home Forums AskWoody support Windows I want to master the numlock key!

    Tagged: 

    • This topic has 16 replies, 6 voices, and was last updated 2 months ago.
    Viewing 11 reply threads
    • Author
      Posts
      • #2342673
        doriel
        AskWoody Lounger

        Hello, I would like to ask for directions in Windows 10. How can be the numlock status mastered?

        there are registry values I should change, that works most of the time, but sometimes suddenly it just misbehaves. On my work notebook after switching on from the “power off” state, numlock is on. I do restart and numlock is off.
        I have the *.reg key that I run on our office computers and for some it works, for some not, but I really struggle to handle this correctly.

        I thought it should be easy to set this basic function on/off.

        Whats your way how to do that? Really appreciate every tip.

        numlock

        Dell Latitude E6530, Intel Core i5 @ 2.6 GHz, 4GB RAM, W10 1809 Enterprise

        HAL3000, AMD Athlon 200GE @ 3,4 GHz, 8GB RAM, Fedora 29

        Attachments:
      • #2342687
        b
        AskWoody MVP

        It has been reported that some people needed to turn off fast startup first, enable num lock, then be able to turn on fast startup again after restarting the computer.

        How to Enable or Disable Num Lock on Sign-in Screen in Windows 10

        1 user thanked author for this post.
      • #2342690
        doriel
        AskWoody Lounger

        Thank you. Wait.. Where is my fastboot option?

        whaaaat
        OK I will try on another computer.

        Dell Latitude E6530, Intel Core i5 @ 2.6 GHz, 4GB RAM, W10 1809 Enterprise

        HAL3000, AMD Athlon 200GE @ 3,4 GHz, 8GB RAM, Fedora 29

        Attachments:
        • #2342833
          RetiredGeek
          AskWoody MVP

          Doriel,

          If hibernation is disabled fast start is also disabled and won’t appear in the screen you posted. 😎

          May the Forces of good computing be with you!

          RG

          PowerShell & VBA Rule!
          Computer Specs

          1 user thanked author for this post.
      • #2342876
        Bundaburra
        AskWoody Plus

        Numlock on/off is often an option in the BIOS/UEFI.  Have a look in there.

        Windows 10 Pro 64 bit 20H2

      • #2343173
        GoneToPlaid
        AskWoody Plus

        Open Notepad and then copy and paste the following lines in between the two rows of asterisks into Notepad. Then save the file as “Keyboard_NumLock_ALWAYS_ON.reg”

        ***********************************
        Windows Registry Editor Version 5.00

        [HKEY_USERS\.DEFAULT\Control Panel\Keyboard]
        “InitialKeyboardIndicators”=”2”

        [HKEY_CURRENT_USER\Control Panel\Keyboard]
        “InitialKeyboardIndicators”=”2”

        ***********************************

        After saving the above a a REG file, right-click on it and then choose to merge it into the registry. Reboot. Your computer will now boot up with Num Lock enabled. If you subsequently create any additional user accounts, those new user accounts will also inherit the new default value (Num Lock is ON) for those accounts. Also note that when you cold boot your computer, the value under HKEY_USERS\.DEFAULT\Control Panel\Keyboard is what is used.

        The above registry settings work at least as far back as Windows 7.

        The default value for both keys (at least in Windows 7) is:

        [HKEY_USERS\.DEFAULT\Control Panel\Keyboard]
        “InitialKeyboardIndicators”=”2147483648”

        [HKEY_CURRENT_USER\Control Panel\Keyboard]
        “InitialKeyboardIndicators”=”2147483648”

        Note that “2147483648” is actually equal to “0” or that Num Lock is turned off.

        • This reply was modified 2 months, 1 week ago by GoneToPlaid. Reason: Add information
      • #2343174
        GoneToPlaid
        AskWoody Plus

        Or instead of using my REG file, under the DEFAULT user, change the value to “2”.

        1 user thanked author for this post.
      • #2343701
        doriel
        AskWoody Lounger

        thank you, seems like the issue is resolved, by setting the value to “2”.

        In the past, I put “InitialKeyboardIndicators”=”2147483650” which seems not to work properly.

        I put “2” and it behaves nicely. thank you once again.

        Dell Latitude E6530, Intel Core i5 @ 2.6 GHz, 4GB RAM, W10 1809 Enterprise

        HAL3000, AMD Athlon 200GE @ 3,4 GHz, 8GB RAM, Fedora 29

      • #2343791
        RetiredGeek
        AskWoody MVP

        Doriel,

        Your question got me to thinking, a dangerous thing! I have a program that sets the registry key for me so that’s not a problem but the “mastering” part is another issue as I seem to constantly “accidentally” hit the NumLock key. This is on a desktop with a Logitech G710+ keyboard so there is a separate number pad and set of navigation keys so I don’t ever want to turn NumLock off.

        I decided to download the PowerToys for W10 Preview and give the Keyboard Manager a go.

        Well it works like a charm and it’s easy to use. I no longer have to worry about the NumLock key as I disabled it and as a bonus I no longer have to worry about the Insert key as that is also disabled, who uses overwrite mode anyway?
        Keyboard-Manager
        HTH :cheers:

        May the Forces of good computing be with you!

        RG

        PowerShell & VBA Rule!
        Computer Specs

        Attachments:
        1 user thanked author for this post.
      • #2343841
        Rick Corbett
        AskWoody_MVP

        The default value for both keys (at least in Windows 7) is:

        [HKEY_USERS\.DEFAULT\Control Panel\Keyboard] “InitialKeyboardIndicators”=”2147483648”

        [HKEY_CURRENT_USER\Control Panel\Keyboard] “InitialKeyboardIndicators”=”2147483648”

        Note that “2147483648” is actually equal to “0” or that Num Lock is turned off.

        I’ve just checked a newly-provisioned clean install of Windows 10 20H2 and the value is now set to 2 so it looks like Microsoft changed it somewhere along the way to ‘Always On’.

        Another line in my default configuration script that I can remove. 🙂

        Hope this helps…

        1 user thanked author for this post.
        • #2344083
          doriel
          AskWoody Lounger

          Im still on 1809, so thanks a lot for the information, Rick.
          Seems like MSFT finally got this right, although I understand, that this default state “Numlock Off” was mostly because of the size, that laptops are made today (14 or 15 inches diameter).
          And they lack numpads, so its logical to have numlock off in default.
          But I still want to be able to turn that on, if I want to. Good to hear that in the future, it looks promising. Less registry tweaking = easier life.

          Also thanks @RetiredGeek for the PowerToys tip! I want to try it, cause its looks very simple and solid. Thanks Rick for the warning, but I fiddled with PowerToys in the past, so debris are definatelly on my computer already.. 😉

          Dell Latitude E6530, Intel Core i5 @ 2.6 GHz, 4GB RAM, W10 1809 Enterprise

          HAL3000, AMD Athlon 200GE @ 3,4 GHz, 8GB RAM, Fedora 29

          • This reply was modified 2 months ago by doriel. Reason: thanks
      • #2343853
        Rick Corbett
        AskWoody_MVP

        One thing to note with the current PowerToys for Windows (Preview) (v0.31.2) is that the package doesn’t uninstall cleanly.

        Whilst the 12 registry entries it leaves (that I found) are minor, File Manager shows the $AppData\Powertoys folder (e.g. C:\Users\user\AppData\Local\Microsoft\PowerToys) remains full of folders plus tiny text and .json files remaining for each of the PowerToys (except File Explorer), even if they haven’t been used/run.

        The PowerToys installer is 18MB but also pulls down a Microsoft Windows Desktop Runtime installer which is a more hefty 202MB… and this isn’t automatically uninstalled either.

        Hope this helps…

      • #2343912
        Rick Corbett
        AskWoody_MVP

        Re: my previous post… I should have clarified that the PowerToys download is 18.4MB but, when installed, expands to 62.6MB.

        Including the required .NET runtime, 264MB seems a tad excessive just to disable the NumLock key (and perhaps Insert) key.

        Come on, RG. I have no doubt you could code the same functionality in about ~1KB of PowerShell. 🙂

        • #2343993
          RetiredGeek
          AskWoody MVP

          He tasks me. He tasks me and I shall have him! I’ll chase him ’round the moons of Nibia and…

          I think that says it all Rick!

          Well, you got me to try a program I’ve been meaning to try, GeekUninstaller, and it seems to have gotten completely rid of Power Toys, at least AFAICT.

          I’ve reinstalled Sharp keys and it does the trick just fine. I used to have that on my machine but somehow it got lost?

          The net result was about a 200Mb space savings on my C: drive. One other thing I found out is that Sharp Keys didn’t recognize my Num Lock key correctly when I used the Type Key option. However, it worked when I selected the key from the list.

          Still searching for a way to PowerShell this… 😎

          May the Forces of good computing be with you!

          RG

          PowerShell & VBA Rule!
          Computer Specs

      • #2344132
        RetiredGeek
        AskWoody MVP

        Rick, “You asked for it!”

        $Remap = New-Object -TypeName byte[] -ArgumentList 24
        <#+------------------------------------------------------------+ |$Remap is a byte array who's size is calculated as follows: | | 8 Bytes 0-7 header of zeros ignored as initialized to zero.| | 4 Bytes 8-11 indicating number of keys to remap plus one. | | 2 Bytes for key to remap TO * number of keys to remap. | | 2 Bytes for key to remap FROM * number of keys to remap. | | 4 Bytes for zero termination again initialized to zero. | | | | Thus in this example where we're remapping 2 keys: | | 8 + 4 + (2*2) + (2*2) + 4 = 24 | +------------------------------------------------------------+ #>
        $Remap[8] = 3 # Number of Remaps + 1 
        
        #--- Disable Num Lock Key
        $Remap[12] = 0x00 # Disable =  To Key * Not needed when disabling
        $Remap[14] = 0x45 # Num Lock = From Key
        
        #--- Disable Insert Key
        $Remap[16] = 0x00 # Disable = To Key
        $Remap[18] = 0x52 # Insert = From Key
        $Remap[19] = 0xE0 # Two byte key!!!
        
        $key = 'HKLM:\SYSTEM\CurrentControlSet\Control\Keyboard Layout'
        New-ItemProperty -Path $key -Name 'ScanCode Map' -Value $Remap -Force
        
        $Prompt = "Requires Re-boot to take effect!`n" +
                  "Press any key to continue."
        Read-Host -Prompt $Prompt
        

        Here are a list of referenced materials:
        Ref #1
        Ref #2
        Ref #3

        Note: Sharpkeys came in handy in identifying the scan code for the Insert Key. Also, make sure your Num Lock is ON before executing. Even though I have Windows set to start with Num Lock on, when I accidentally ran the script with Num Lock OFF when it rebooted it stayed off and the key wan inactive so I couldn’t turn it back on. Solution was to set the key back to itself, reboot, make sure the light was on, disable the key, reboot, done!

        HTH

        May the Forces of good computing be with you!

        RG

        PowerShell & VBA Rule!
        Computer Specs

        2 users thanked author for this post.
        • #2344142
          Rick Corbett
          AskWoody_MVP

          RG – That is a *really* elegant solution using scancodes.

          Thanks also for the links; they were very interesting, especially the How-To Geek one.

          I’m playing with SharpKeys now. I had never encountered it before and see what you mean about its usefulness in showing the actual scancodes.

          Up until now I’ve only used AutoHotkey solutions. One to force CapsLock off on any new builds, just a one-line regedit within my standard ‘configuration’ script; the other as a very short one-liner (CapsLock::return) to disable CapsLock by remapping it to null in the multi-use script I use every day to make life easier, like autocorrect some of my typos or auto-expand @@ t0 my rather long email address.

          PS – What none of the articles mention is that using the registry – e.g. scancodes – is global. I’ve often used AutoHotkey‘s built-in remapping (as an alternative to using the registry) because I can limit the effect on a conditional basis, e.g. per-user or per-app. For example, to force CapsLock on within Notepad yet keep it off within WordPad.

    Viewing 11 reply threads

    Please follow the -Lounge Rules- no personal attacks, no swearing, no politics or religion.

    Reply To: I want to master the numlock key!

    You can use BBCodes to format your content.
    Your account can't use Advanced BBCodes, they will be stripped before saving.