I'm trying to find a way to disable the Windows key, either through GPO, local policy, or an edit in the registry, but Google has been less than helpful.
5 Answers
Like CJ1992 says (I could not comment unfortunately hence new post), but the AutoHotkey syntax now seems to be (it might be that I use 1.1.30.00 - the 2018-08-22 version):
LWin::return
RWin::return
Quoted from the AutoHotkey site.
- 12,326
If using AutoHotkey, the following script disables the ability for the Win key to activate the Start Menu, while still allowing its use as a modifier:
~LWin::
~RWin::Send {Blind}{vkFF}
- 679
There are multiple ways of disabling the Windows Key as seen on this page
Option 1: Registry Editor
- Click Start, click Run, type regedt32, and then click OK.
- On the Windows menu, click HKEY_LOCAL_ MACHINE on Local Machine.
Double-click the System\CurrentControlSet\Control folder, and then click the Keyboard Layout folder.
On the Edit menu, click Add Value, type in Scancode Map, click REG_BINARY as The Data Type, and then click OK.
Type 00000000000000000300000000005BE000005CE000000000 in the Data field, and then click OK.
Close Registry Editor and restart the computer.
Option 2: AutoHotKey
Download AutoHotKey from http://www.autohotkey.com/
Run it, then right click on its icon in the taskbar.Select 'Edit This Script' and it'll open the default script in Notepad
Somewhere between the comments (which are marked with semi-colons) add the following:
~LWin Up:: return
~RWin Up:: return
Now just save the file, right click on AutoHotkey again, and select 'Reload This Script.'
Try SharpKeys. It's like a graphical interface to the registry. Whatever change you make is written to the registry, so no daemons, no background processes. Just make the change, log off and log in. Features include:
- re-map keys
- disable keys
And it's open source software, and it's tiny.
- 12,326
- 4,393
I have managed to successfully do this. Just download the following .bat file, right-click on it, and run it as administrator. Your computer will restart and after you log in, you can hit the Windows key. Win + R, etc. won't work.
The Bat files:
If you change your mind and want your Windows key working again, then just download the following:
https://drive.google.com/file/d/1Xm-16l0yyZFqGCTcMlcQ5bSGXu_o2jZf/view
If you're wondering what the bat file does to disable Windows key, it simply adds a new binary key called "Scancode map" and restarts your computer.
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout" /v "Scancode Map" /t REG_BINARY /d 00000000000000000300000000005BE000005CE000000000 && shutdown /r -t 00
To enable the Windows key, the bat file simply deletes the binary value and restarts your computer.
reg delete "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout" /v "Scancode Map" /f && shutdown /r -t 00
- 12,326