Why is my Alt key acting as Windows key? Fix hidden setting
In this article
Yes, your Alt key can be remapped to the Windows key by a hidden registry setting; you can revert it by editing the registry or using PowerToys to reset the mapping.
What You’ll Need
- Windows 10 or 11 computer with administrative privileges.
- Notepad or another plain text editor.
- Optional: Microsoft PowerToys installer.
Step‑by‑Step
- Open the Registry Editor by pressing
Win + R, typingregedit, and hittingEnter. Confirm the UAC prompt if it appears. - Navigate to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout. If you see a value namedScancode Map, that is the key that can change Alt to Windows. - Right‑click
Scancode Mapand chooseModify(orDeleteif you want to remove it entirely). The data will be a binary string like00 00 00 00 00 00 00 00 02 00 00 00 1D 00 5B 00 00 00 00 00, where1D 00is the left Alt scancode and5B 00is the left Windows key scancode. - To restore the default mapping, replace the data with
00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00or simply delete the entireScancode Mapvalue. Confirm the change. - Close the Registry Editor and reboot your computer. The Alt key should now behave normally.
- If you prefer a safer, GUI‑based approach, download and install Microsoft PowerToys. Open PowerToys, go to Keyboard Manager, and click Remap a key. Locate the entry that maps Alt to Windows and remove it.
- After removing the mapping, click Apply and restart your session if prompted.
Common Mistakes
- Editing the wrong registry hive. The mapping lives under
HKEY_LOCAL_MACHINE, notHKEY_CURRENT_USER. - Leaving stray bytes in the
Scancode Mapvalue. Even a single extra byte can corrupt the mapping and cause random key behavior. - Using PowerToys without enabling the Keyboard Manager module. PowerToys requires the module to be turned on in the main settings panel.
- Assuming the change will take effect immediately. A reboot or a user log‑off is required for registry edits to apply.
Tips
- Before editing the registry, create a restore point: Search for "Create a restore point" in the Start menu, select your drive, and click Restore point….
- If you are uncomfortable with registry edits, use PowerToys; it provides a visual interface and automatically backs up the original mapping.
- Keep a backup copy of the original
Scancode Mapvalue in case you need to revert. Right‑click the value, choose Export, and save the .reg file. - For users who use multiple keyboards, check that the mapping is not set per device by looking under
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout\Keyboard Layoutsfor device‑specific overrides.
Troubleshooting
- Alt still behaves like Windows after reboot: Verify that the registry value was deleted or set to the default binary string. Re‑open Regedit to confirm.
- Other keys are affected: A corrupted
Scancode Mapcan alter multiple keys. Restore the default binary string or delete the value entirely. - PowerToys remap does not apply: Ensure the Keyboard Manager module is enabled in the PowerToys main settings. Also check that no other remapping tool (e.g., SharpKeys) is running.
- System freezes after editing registry: Use the backup .reg file to revert to the previous state. If the system fails to boot, boot into Safe Mode and delete the problematic value.
- Alt key still non‑functional: The keyboard itself may be defective. Test the key on another machine or use an external USB keyboard to confirm.
Frequently Asked Questions
Can I change the Alt key to another function instead of Windows?
Yes. Use PowerToys or a third‑party remapping tool to assign Alt to a custom action, such as opening a specific application or executing a macro.
Will editing the registry affect other users on the same computer?
Yes, changes under HKEY_LOCAL_MACHINE apply system‑wide. If you only want the change for your account, use HKEY_CURRENT_USER with the same Scancode Map structure.
Is there a way to toggle the Alt‑Windows swap without editing the registry?
Windows 11 includes a hidden setting that can be toggled via the Keyboard Layout control panel, but it is not exposed in the standard Settings UI. The registry method is the most reliable.
What happens if I delete the wrong registry key?
Deleting unrelated keys can cause system instability. Always back up the registry before making changes and only edit the specific Scancode Map value.
Can a keyboard driver override these settings?
Some OEM drivers include their own remapping utilities that can override registry changes. If the Alt key remains swapped, check the driver’s configuration panel for a key‑mapping option.