Tuesday, May 15, 2018

disable all keyboard shortcuts in windows


I want to disable all keyboard shortcuts in windows, not only the WIN-X ones, but also the CTRL-X ones.


I have found a way to disable the WIN-X ones, by using the registry editor and navigating to HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Exlporer and adding a key NoWinKeys and setting it to 0. However, I haven't yet found something like that for the CTRL-X shortcuts.


I want to do this without using any third party tools, preferably using Group Policy or the registry.


Answer



For disabling any physical key on the keyboard is a registry entry too.


It's in [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
You create a key with the name Scancode Map. It can redirect any key to another key or disable it.


That key is a hex-value with the following meaning:


00,00,00,00 Header: Version. Set to all zeroes.
00,00,00,00 Header: Flags. Set to all zeroes.
03,00,00,00 3 entries in the map (including null entry).
00,00,xx,yy key xx xx -> Disable (0x00) but can also be another key
00,00,xx,xx key yy yy -> Disable (0x00).
00,00,00,00 Null entry.

To completely disable the CTRL you only need two entries (plus null).
The Left Left-CTRL (1d 00) and Right-CTRL (1d e0).


So you can create a .reg file like this: Disable_CTRL-key.reg


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,1d,00,00,00,1d,e0,00,00,00,00

Execute (double click) the .reg file and log out and back in (or restart your computer). Now your CTRL-keys are completely disabled.


Other useful keys to know:


1d 00    Left Ctrl
1d e0 Right Ctrl
38 00 Left Alt
38 e0 Right Alt
5b e0 Left Windows Key
5c e0 Right Windows Key
5d e0 Windows Menu Key

If you are not comfortable with changing the registry or you want other keys too you can use the program SharpKeys to edit them more easily. It also has a convenient list of all keys so you can just add them in a window.


SharpKeys


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...