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
Mark Jacob, Cisco Instructor, presents an introduction to Cisco Modeling Labs 2.0 or CML2.0, an upgrade to Cisco’s VIRL Personal Edition. Mark demonstrates Terminal Emulator access to console, as well as console access from within the CML2.0 product. Hello, I’m Mark Jacob, a Cisco Instructor and Network Instructor at Interface Technical Training. I’ve been using … Continue reading A Simple Introduction to Cisco CML2
This content is from our CompTIA Network + Video Certification Training Course. Start training today! In this video, CompTIA Network + instructor Rick Trader demonstrates how to use cable testers in network environments. Let’s look at some tools that we can use to test our different cables in our environment. Cable Testers Properly Wired Connectivity … Continue reading Cable Testers and How to Use them in Network Environments
In this video, Security Instructor Mike Danseglio demonstrates how to use BitLocker in Window 10 to secure files on a USB Flash drive that adhere to stricter data protection requirements as found inside Government entities. BitLocker 2-day instructor-led training is now available at Interface: BITLOCK: Planning and Deploying BitLocker Drive Encryption Training Video Transcription: Hi. … Continue reading Government Edition – Encrypting a USB Flash Drive in Windows 10