If you need to disable the Windows (Win) key on your keyboard, you can do so by making certain changes in the operating system’s Registry Editor.
To open the Registry Editor, press the Win + R key combination, type in “regedit” in the Run dialog box, and press Enter.
In the Registry Editor window, navigate to the following section:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout
For a quick guide on accessing this registry section, you can refer to this ➯ article.
In the right pane of the Registry Editor, right-click and select New > Binary Value from the context menu, then name it “Scancode Map”.
Double-click the newly created parameter name. This will open the “Edit Binary Value” window, where you can input the hexadecimal values as shown in the screenshot below. Enter the characters in pairs; the left and right values will fill in automatically. Once done, click OK, close the Registry Editor, and restart your computer.
The Win key on your keyboard is now disabled. If you need to re-enable it in the future, simply delete the “Scancode Map” parameter in the Registry Editor and restart your computer.
Alternatively, you can create and apply a registry file with the following content to disable the Windows key:
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,03,00,00,00,00,00,5B,E0,00,00,5C,E0,00,00,00,00.
To enable the Windows key, create and apply a registry file with the following content:
Windows Registry Editor Version 5.00.
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Keyboard Layout].
“Scancode Map”=-.
After applying the registry file, restart your computer.
You can also download ready-made registry files: