Why does my Numlock key keep resetting?
Why does my Numlock key keep resetting?
While teaching a Configuring Windows 8/8.1 (20687D) course last week, one of my students exclaimed the very title of this blog – “Hey, why does my Numlock key keep resetting?”
Just the type of trivia that can gain an instructor’s attention. Thus, during their first long lab, I began my research.
The symptoms: Student M prefers having the Numlock key set for use of the ten key pad on his keyboard. He selects the Numlock key, logs into the Windows 2012R2 server that serves as a platform for the class, and proceeds to take notes, browse the web, and perform his labs. He notes intermittently that the Numlock key is being reset to off.
Gremlins? User error? Classmate prank?
Potential cause(s) based on research:
Fast Startup mode for Windows 7 and Windows 8 can result in the Numlock key being turned off during startup. A registry setting may resolve the issue, although the appropriate registry setting only solves the problem most of the time (at least according to responses in the blogs that I found.) One of the better answers was provided by Shyam Sasindran, MVP on the Windows Club.
Fast Startup may be the cause, though a review of the registry key settings indicates the correct value as suggested in The Windows Club article: registry key HKEY_USERS\Default\Control Panel\Keyboard\InitialKeyboardIndicators has a value of 2147483648.
This answer is actually a carryover from Windows XP. From Microsoft support: Let me fix it myself.
To enable NUM LOCK before a user logs on, follow these steps:
- Run Registry Editor.
- Move to:
- Change the value for InitialKeyboardIndicators from 0 to 2.
Additional research identifies that:
0 = Numlock is turned off after logon
2 = Numlock is turned on after logon
And a little more research found a similar article from the Hampel Group How to turn on/off Keyboard NumLock on bootup in Windows that yields even better details.
0 – Turn all indicators Off (Numlock, CapsLock, ScrollLock)
1 – Turn CapsLock On
2 – Turn Numlock On
3 – Turn CapsLock and Numlock On
4 – Turn ScrollLock On
5 – Turn CapsLock and ScrollLock On
6 – Turn Numlock and ScrollLock On
7 – Turn all indicators On (Numlock, CapsLock, ScrollLock)
So one is actually only enabling a default setting for the user.
Microsoft offers another option: How to Set the NUM LOCK State at Logon in Windows XP specifically for Windows XP VBS script attached at login to a user account.
At this point, we now know how to set the startup and persistent mode for the Numlock key on a standalone system on a per user basis. Unless, of course, one taps the Numlock key itself.
Though this does not explain directly why the symptoms persist for a single user on the Windows 2012R2 server providing Hosted services for Student M.
Decided to observe and then re-create the scenario. Login to server (host). Select Numlock key and confirm its operation. Start Hyper-V. Start a virtual machine. Virtual images for Windows 7, Windows 8, and Windows Server 2012R2 are all used in this class. Tap the Numlock key to enable it. As any of the virtual machines are started or restarted, the HOST Numlock key is reset to ‘off’. Tried the Caps Lock key, with the same results. If one logs into the Windows 7, Windows 8, or Windows Server virtual instances and then selects the Numlock key, it stays set until a different virtual machine is started or reset.
So the situation results because of the virtual machine environment.
Found the culprit. Start, stop, restart, authentication on any virtual instance resets the Numlock key to off – unless the most recent authentication applied has the Numlock key enabled within the user’s profile.
If the Numlock key is enabled while an account is logged in and active on a virtual machine, restart of the virtual machine turns off the Numlock key. Logging back into the machine results in the Numlock key being turned on – as long as it was set while the user profile was active. Essentially the behavior of the Numlock key is user specific, and stored on a per user profile basis.
And as any virtual system is started, or authentication on a virtual machine occurs, the state of the Numlock key changes to match the most recent activity.
This answer alone does not resolve why starting any virtual machine turns off the HOST Numlock key. Curious as to whether the scenario only applies to Hyper-V, I tested the symptom on a Windows 7 Ultimate platform hosting Windows Virtual PC and an instance of Windows 7 Enterprise. Extremely similar if not identical results. Restart the virtual client and the Numlock key is reset. If Numlock is turned on once a user has authenticated, the restart of the virtual machine turns off the Numlock, and authentication will automatically turn it back on.
Apparently others have experienced the scenario, and most of the solutions I discovered are uniquely platform specific and potentially complex. For instance, a virtual Windows Server2008 running on VMWare Workstation 7.1.0 suggests force modifying the BIOS of the virtual machine to enable the Numlock key at startup of the image.
A newer Technet article addresses setting Hyper-V to enable Numlock through BIOS, either through Hyper-V or with a Powershell script. Tested this solution on Windows 2012R2 Hyper-V server, and the selection of Numlock Key for the virtual BIOS does not keep the Numlock key on once the virtual machine arrives at the authentication screen. The recommended script seems to intermittently work, though I did not totally shut down all of the virtual machines AND Hyper-V before running it.
Starting and stopping virtual machines, or logging in and out, continues to reset the Numlock key.
Nate Johnson offers a direct solution Win8/Hyper-V 2012 Enable Num Lock on All Virtual Machines.
for enabling all virtual machines under Windows 8/8.1 or Windows Server 2012(R2) to start with the Numlock on. As he notes, all of the virtual machines must be off for his recommended script to work thoroughly. You really do need an all or nothing approach, otherwise each virtual system start will turn off the Numlock (or turn it on if you implemented the bulk change), and each authenticated user will reset the Numlock key to the user’s preferred state.
So there you have it… Numlock needs to be controlled on a per user, per profile basis. If you have multiple virtual instances and accounts that you use, you will have some work to do in order to assure that they all have Numlock on as the preference.
Or you can always just tap the key one more time.
You May Also Like
In this video, you will gain an understanding of Agile and Scrum Master Certification terminologies and concepts to help you make better decisions in your Project Management capabilities. Whether you’re a developer looking to obtain an Agile or Scrum Master Certification, or you’re a Project Manager/Product Owner who is attempting to get your product or … Continue reading Agile Methodology in Project Management
See our class schedule for complete Course Schedule Training. Instructor: Rick Trader How to Reset a Windows Client Secure Channel Password I’m sure you’ve ran into a situation where a user is attempting to log into a machine but they’re getting prompted that there’s no secure password or a secure channel for the client computer … Continue reading How to Reset a Windows Client Secure Channel Password
How does an investigator hunt down and identify unknown malware? In this recording of our IT Security training webinar on April 21, 2015, Security expert Mike Danseglio (CISSP / CEH) performed several malware investigations on infected computers and identify symptoms, find root cause, and follow the leads to determine what’s happening. He demonstrated his preferred … Continue reading Detailed Forensic Investigation of Malware Infections – April 21, 2015