Can I programmatically disable the caps lock key in Windows?

The lock key locks me with nuts - I never use it intentionally, but sometimes accidentally press it instead of TAB. My current solution is to remove the button with a screwdriver (without damage, you can return it back if ever needed).

Is there a way to disable the Caps Lock key programmatically in Windows - write a program using the keyboard or something like that? Where to begin?

+4
source share
2 answers

To just redo the Caps lock (without installing software) on a computer running Windows 2000 or Windows XP, I adapted the information found in How to globally display AltGr key in Alt? in the following way. Mapping Caps to null is one example, but you can choose a different key to display, just like me. To map caps to zero, the registry file:

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

Save this as filename.reg and execute, then reboot (or log out and log in).

I based on this answer from this page by Thomas Sedovic and on Scan Code Mapper for Windows recommended by Ronald Blaschke. I entered spaces to let me / you see how bytes are grouped into words.

Note that I actually used this to match Caps for Ctrl, and my second - last group of numbers was "1d, 00,3a, 00", and I confirmed that this works great.

+3
source

Question How to create a custom keyboard layout? describes how to change the functionality of a Caps Lock key.

+1
source

All Articles