• I want to master the numlock key!

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

    Tags:

    Author
    Topic
    #2342673

    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 3420, Intel Core i7 @ 2.8 GHz, 16GB RAM, W10 22H2 Enterprise

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

    PRUSA i3 MK3S+

    Viewing 13 reply threads
    Author
    Replies
    • #2342687

      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

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

      whaaaat
      OK I will try on another computer.

      Dell Latitude 3420, Intel Core i7 @ 2.8 GHz, 16GB RAM, W10 22H2 Enterprise

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

      PRUSA i3 MK3S+

      • #2342833

        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

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

      Windows 10 Pro 64 bit 20H2

    • #2343173

      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 4 years, 2 months ago by GoneToPlaid. Reason: Add information
    • #2343174

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

      1 user thanked author for this post.
    • #2343701

      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 3420, Intel Core i7 @ 2.8 GHz, 16GB RAM, W10 22H2 Enterprise

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

      PRUSA i3 MK3S+

    • #2343791

      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

      1 user thanked author for this post.
    • #2343841

      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…

      2 users thanked author for this post.
      • #2344083

        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 3420, Intel Core i7 @ 2.8 GHz, 16GB RAM, W10 22H2 Enterprise

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

        PRUSA i3 MK3S+

        • This reply was modified 4 years, 2 months ago by doriel. Reason: thanks
    • #2343853

      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

      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

        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

      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

      • This reply was modified 4 years, 2 months ago by RetiredGeek.
      3 users thanked author for this post.
      • #2344142

        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.

    • #2372293

      Here is a woodys link to a NUM LOCK problem with 8.1 on an Acer that was convoluted but solved.
      https://www.askwoody.com/forums/topic/num-locks-not-on-from-sleep-log-in-and-wont-stay-on/

      I Hope this sheds some light on it.

      1 user thanked author for this post.
      • #2381734

        Recently I have the feeling, that numlock is misbehaving wildly. Cant see any pattern in the ON or OFF state, changing randomly before/after login, switching apps and so.
        Also our DELL wireless keyboards misbehave too – numlock LED shuts down, but the state is on. This is very poorly drsigned.
        I manage like 100 PCs and I see that a lot.

        Dell Latitude 3420, Intel Core i7 @ 2.8 GHz, 16GB RAM, W10 22H2 Enterprise

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

        PRUSA i3 MK3S+

    • #2381844

      Doriel,

      I’m a Dell user and have the same problem. IMHO it’s not the Dells but rather some application that is messing with these settings and not returning them to their previous setting upon exit. I’ve yet to isolate it because it is fairly random to my observation. 😎

      FYI: My updated Keyboard remapping Powershell program can be downloaded here.

      May the Forces of good computing be with you!

      RG

      PowerShell & VBA Rule!
      Computer Specs

      1 user thanked author for this post.
    • #2566318

      had a slightly different angle on this, had a asus laptop where numlock would get turned on at every reboot(it is a 14″ laptop, so doesnt have a separate number pad, which means that half the keyboard types numbers by default, which is very annoying) . I tried all the above, nothing worked. ended up writing a script kicked off by a scheduled task that runs at startup and at log on for this, to turn num lock off if it is detected as being on.

      script is below. it only seems to work after log on though, but i cant be bothered to work out why as i have spent hours on this and it works enough for me.

      if([console]::NumberLock) { $w = New-Object -ComObject WScript.Shell; $w.SendKeys(‘{NUMLOCK}’); }

      if you want to do the reverse, use

      if(-not [console]::NumberLock){ $w = New-Object -ComObject WScript.Shell; $w.SendKeys(‘{NUMLOCK}’); }

      i also kick off a registry file from the same task to set the values in the registry as they get overwritten every time. i dont think this actually achieves very much but as i had it i thought i would run it anyway. your S- number may well be different to mine, so make sure you change it.

      Windows Registry Editor Version 5.00

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

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

      [HKEY_USERS\S-1-5-18\Control Panel\Keyboard] “InitialKeyboardIndicators”=”2147483648”

      [HKEY_USERS\S-1-5-21-1658153221-431003928-1463442403-1002\Control Panel\Keyboard] “InitialKeyboardIndicators”=”2147483648”

      i got the code for the powershell script from here:

      https://stackoverflow.com/questions/41234687/how-to-check-if-numlock-is-enabled

      • #2568795

        had a slightly different angle on this, had a asus laptop where numlock would get turned on at every reboot(it is a 14″ laptop, so doesnt have a separate number pad, which means that half the keyboard types numbers by default, which is very annoying) . I tried all the above, nothing worked. ended up writing a script kicked off by a scheduled task that runs at startup and at log on for this, to turn num lock off if it is detected as being on.

        script is below. it only seems to work after log on though, but i cant be bothered to work out why as i have spent hours on this and it works enough for me.

        if([console]::NumberLock) { $w = New-Object -ComObject WScript.Shell; $w.SendKeys(‘{NUMLOCK}’); }

        if you want to do the reverse, use

        if(-not [console]::NumberLock){ $w = New-Object -ComObject WScript.Shell; $w.SendKeys(‘{NUMLOCK}’); }

        i also kick off a registry file from the same task to set the values in the registry as they get overwritten every time. i dont think this actually achieves very much but as i had it i thought i would run it anyway. your S- number may well be different to mine, so make sure you change it.

        Windows Registry Editor Version 5.00

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

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

        [HKEY_USERS\S-1-5-18\Control Panel\Keyboard] “InitialKeyboardIndicators”=”2147483648”

        [HKEY_USERS\S-1-5-21-1658153221-431003928-1463442403-1002\Control Panel\Keyboard] “InitialKeyboardIndicators”=”2147483648”

        i got the code for the powershell script from here:

        https://stackoverflow.com/questions/41234687/how-to-check-if-numlock-is-enabled

        With respect, if you submit code (PowerShell or .REG) then please use <pre>…</pre> tags around the code to make your posts readable.

        1 user thanked author for this post.
    Viewing 13 reply threads
    Reply To: I want to master the numlock key!

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

    Your information: