Alt, Windows and CTRL Keys Disabled After Registry Edit

CeleBelly

Reputable
Mar 31, 2020
8
0
4,510
TLDR:
I followed the instructions in the quotation box below and disabled CTRL, Alt and the Windows key and want to undo it.

Full Explanation:
A few days ago my keyboard started spamming Y or S nonstop unless I pushed one of them, though neither of the keys actually typed when I did. I have a Razer Blackwidow V2 that I keep clean and take good care of. There's nothing physically stuck under or in the keys causing this, so I tried some troubleshooting with Razer, updating my keyboard's firmware, even uninstalling all Razer programs entirely to see if it had anything to do with it and I still continued to have the problem.

I knew it wasn't hardware, I don't believe it's Razer, so I figured it was Windows 11 related. I looked up some solutions to the problem and came across someone answering the same question I had on Microsoft's forums. One of their fixes was:
1. Press the Windows + Q keys, type and click on Notepad;
2. Paste the values below into the notebook:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,09,00,00,00,00,00,5b,e0,00,00,5c,e0,00,00,5d,e0,00,00,44,00,00,00,1d,00,00,00,38,00,00,00,1d,e0,00,00,38,e0,00,00,00,00

3. Click File> Save, name it Keyboard.reg and click OK (Save to the desktop);
4. Right-click on Keyboard.reg and select Merge;
5. Click Ok> Yes> Yes.
6. Restart the system.
It fixed the spamming and allowed me to use Y and S again, though I didn't realize in doing this that I'd disable my Alt, Windows and Ctrl keys. I found out later on that viruses can cause the spamming issue and scanned my computer, come to find out I had a trojan and had my antivirus take care of it. I'm not sure that'd fix it, though I wanted to see if it did and undo the registry changes, though looking it up, it seems like the only way to put a registry back to default is a fresh install of Windows 11. Would that still be the case since I know what I did to change it? Or is there another way to put my keyboard back to its default layout?

Things I've Tried With Both Problems:
  • Going back to a restore point, both before the registry change and before my initial keyboard problem started
  • Deleting the .reg I created on my desktop (probably shouldn't have done that)
  • Running diagnostic with CMD prompt
  • Uninstalling and reinstalling Keyboard driver (through device manager, not Razer)
  • Uninstalling and reinstalling Razer programs
  • Making sure Razer didn't override any keys with Macros
  • Making sure Sticky Keys is off
  • Updating every driver on my PC and making sure Windows 11 is up to date
 
TLDR:
I followed the instructions in the quotation box below and disabled CTRL, Alt and the Windows key and want to undo it.

Full Explanation:
A few days ago my keyboard started spamming Y or S nonstop unless I pushed one of them, though neither of the keys actually typed when I did. I have a Razer Blackwidow V2 that I keep clean and take good care of. There's nothing physically stuck under or in the keys causing this, so I tried some troubleshooting with Razer, updating my keyboard's firmware, even uninstalling all Razer programs entirely to see if it had anything to do with it and I still continued to have the problem.

I knew it wasn't hardware, I don't believe it's Razer, so I figured it was Windows 11 related. I looked up some solutions to the problem and came across someone answering the same question I had on Microsoft's forums. One of their fixes was:

It fixed the spamming and allowed me to use Y and S again, though I didn't realize in doing this that I'd disable my Alt, Windows and Ctrl keys. I found out later on that viruses can cause the spamming issue and scanned my computer, come to find out I had a trojan and had my antivirus take care of it. I'm not sure that'd fix it, though I wanted to see if it did and undo the registry changes, though looking it up, it seems like the only way to put a registry back to default is a fresh install of Windows 11. Would that still be the case since I know what I did to change it? Or is there another way to put my keyboard back to its default layout?

Things I've Tried With Both Problems:
  • Going back to a restore point, both before the registry change and before my initial keyboard problem started
  • Deleting the .reg I created on my desktop (probably shouldn't have done that)
  • Running diagnostic with CMD prompt
  • Uninstalling and reinstalling Keyboard driver (through device manager, not Razer)
  • Uninstalling and reinstalling Razer programs
  • Making sure Razer didn't override any keys with Macros
  • Making sure Sticky Keys is off
  • Updating every driver on my PC and making sure Windows 11 is up to date

• KeyTweak should help you solve the specific problem, fixing those keys you want remapped to defaults, including those you initially wanted to fix.


• The site where you downloaded the regedit should also have a "undo" regedit.

• And a third option is learning how to modify the regedit to make it "undo" the initial changes.
 
Last edited:
  • Like
Reactions: CeleBelly
Another option, is copying the Keyboard layout registry key, to create a regedit.reg file, from another Windows 10, 11 or whatever it is, and merging it to your Windows Registry.
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]

If you haven't deleted the "Scancode Map"=hex: registry value from your registry, that should be removed first. It apparently is not a default value.
 
  • Like
Reactions: CeleBelly

CeleBelly

Reputable
Mar 31, 2020
8
0
4,510
• KeyTweak should help you solve the specific problem, fixing those keys you want remapped to defaults, including those you initially wanted to fix.


• The site where you downloaded the regedit should also have a "undo" regedit.

• And a third option is learning how to modify the regedit to make it "undo" the initial changes.
Using Keytweak to set the mapping back to the default worked, and it seems like my spamming problem is gone too. Thanks so much for the help! I wouldn't have thought to change it that way. I tried through Razer Synapse and forgot it probably wouldn't override anything the actual system had going on. I appreciate it!
 

CeleBelly

Reputable
Mar 31, 2020
8
0
4,510
Honestly, without knowing more about this Trojan that may have been keylogging, I would suggest a wipe/clean install and changing of passwords on anything important right away. I would also activate 2FA on those items as well.
Pretty much everything I login to is prefilled or seldom logs me out, so I don't type passwords in often, though I'll still do that just in case. Thank you for the heads up!
 
Using Keytweak to set the mapping back to the default worked, and it seems like my spamming problem is gone too. Thanks so much for the help! I wouldn't have thought to change it that way. I tried through Razer Synapse and forgot it probably wouldn't override anything the actual system had going on. I appreciate it!

The Keytweak application probably removed the Trojan registry value "Scancode Map hex" though it would be recommended to visually check the "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout" key, to confirm if the said value is completely gone. And since there are other "Keyboard Layout" and "Keyboard Layouts" keys in the Registry, I'd suggest doing a Registry search for that key name.
And just in case, you should also run a Trojan scanner to make sure the bug is completely gone.