These methods in this gist worked for me on my U.S.-based keyboard layouts. I am unsure about other layouts. If you have problems, revert your changes; delete the registry key you created (and reboot).
Update: you should probably scroll down to approach 4 where I suggest using Microsoft PowerToys Keyboard Manager.
Approach 1. Manually through regedit
Navigate to and create a new binary value in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout
named Scancode Map
.
You will enter the raw bytes like this (thanks @quapka):
00 00 00 00 00 00 00 00 02 00 00 00 1d 00 3a 00 00 00 00 00
Save. Reboot. Done.
Approach 2. Make your own registry key file.
Thanks @datsuka-qwerty
Create a new .reg
file and name it something meaningful like capstoctrl.reg
. Edit the file and paste in the following:
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,3a,00,00,00,00,00
Save. Run the file. Reboot. Done.
Approach 3. Through PowerShell (as Administrator)
Open PowerShell as an administrator (Win + X)
$hexified = "00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00".Split(',') | % { "0x$_"};
$kbLayout = 'HKLM:\System\CurrentControlSet\Control\Keyboard Layout';
New-ItemProperty -Path $kbLayout -Name "Scancode Map" -PropertyType Binary -Value ([byte[]]$hexified);
Save. Reboot. Done.
Approach 4. Microsoft PowerToys
Give PowerToys a try for remapping not only capslock, but other keys as well. Microsoft PowerToys: Utilities to customize Windows 10.
Microsoft PowerToys: Keyboard Manager enables you to redefine keys on your keyboard.
Quick Links
-
How To Disable or Remap the Caps Lock Key in Windows Using PowerToys
-
How to Disable or Remap Caps Lock Using SharpKeys
-
Under the Hood: How Windows Key Re-Mapping Works
-
Downloadable Registry Hack to Disable or Remap the Caps Lock Key
The caps lock key is a remnant of typewriters dating from the nineteenth century. Unless you’re in the accounting department, it’s probably not very useful, so today we’ll learn how to disable it, or remap it to something else that’s more useful.
A lot of people tend to use Caps Lock like a Shift key, so an easy method that some people prefer is to swap it with Shift—but a more interesting idea is to remap it to the Ctrl key since it’s a lot easier to hit the Caps Lock key without moving your typing hand position from the home row than it is to hit the regular Ctrl key.
Did you know you can also disable or remap Caps Lock on your iPad, Mac, or even your Chromebook?
How To Disable or Remap the Caps Lock Key in Windows Using PowerToys
The easiest way to change the Caps Lock key is by downloading Microsoft’s PowerToys and using the built-in Keyboard Remapper to remap the Caps Lock key to something else. First, you’ll need to have installed PowerToys from Github, and then open up PowerToys Settings via the Start Menu.
Once you’ve opened PowerToys Settings, head to Keyboard Manager, and then click the «Remap a key» button.
In the Remap keys dialog, you’ll want to click the «Type» button under «Physical Key», and then press the key you want to remap—in this case you’ll press the Caps Lock key. Once you’ve pressed the key you want to remap, click the OK button.
Now you’ll click the «Type» under «Mapped To» and then press another key that you’d like to convert Caps Lock into—in this case we’re going to turn it into a Ctrl button, but you could use it for Shift or any other key you’d like to turn it into. Once you’re done click, OK, and then click OK again to close out of the settings.
As long as PowerToys is running on your system, the Caps Lock key will be remapped to the alternative key that you chose. It’s worth checking out all the other features in PowerToys, because it’s well worth running for any system tweaker.
This does mean, however, that if PowerToys closes, the Caps Lock key will return. It also means that it won’t be disabled on the Login screen, which might be very annoying if you’re the kind of person like me who constantly types your password with the Caps lock on by accident. The solution? Use SharpKeys instead, which we detail below.
How to Disable or Remap Caps Lock Using SharpKeys
An excellent solution for remapping keys on any version of Windows is Randy’s SharpKeys, which can be downloaded from the Microsoft Store for Windows 10 or 11, or from the project’s Github page for older versions of Windows.
The benefit to SharpKeys over PowerToys? You can remap keys however you like, and they will stay remapped or disabled even if you delete the SharpKeys app entirely—you don’t need any software running in the background.
Once you’ve downloaded and installed SharpKeys, and clicked through the Windows SmartScreen error messages to run it anyway, you can add a new mapping by clicking Add, selecting the key you want to remap (Caps Lock in this case) and then selecting «Turn Key Off» to disable it entirely, or selecting a new key to remap it to. Click OK, reboot your PC, and you’re done.
The one downside to SharpKeys vs the PowerToys utility is that you can’t remap a key combination—using PowerToys you could remap ALT+C to CTRL+C, for example. You can’t do that with SharpKeys.
Under the Hood: How Windows Key Re-Mapping Works
Windows doesn’t have a default setting to allow for disabling the key, so what we have to do is re-map the key to something non-existent so as to completely disable it. To do this manually, you’d open up regedit.exe and browse down to the following key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout
Here’s the format of the binary data in the Scancode Map key, with the important parts in bold and various colors:
00000000 00000000 02000000 00003A00 00000000
Here’s how it works:
- The first 16 zeros are just there to waste space.
- The «02» in bold represents how many keys you are going to re-map plus 1. (It really represents the length of the data, but whatever)
- The orange bolded «0000» is the key we actually want Windows to map TO, which in this case is nothing, or 0.
- The blue bolded «3A00» is the key we are mapping from, in this case the caps lock key.
- The next 8 zeros are there to waste space as the null terminator.
You can map between multiple keys by incrementing the «02» and then adding another of the colorful bold blocks in the middle. The 3A00 in the mix is the scan code. For example, if you wanted to disable the caps lock key and then change scroll lock into a caps lock key:
00000000 00000000 03000000 00003A00 3A004600 00000000
It might seem complicated, but it’s really fairly simple once you start working with it.
Downloadable Registry Hack to Disable or Remap the Caps Lock Key
Now that you’ve learned how these things work internally, you can download and extract the zipfile which contains the following files:
ChangeCapsToControl.reg |
Changes Caps Lock to be a Control key |
ChangeCapsToShift.reg |
Changes Caps Lock to be a Shift key |
SwitchCapsToScrollLock.reg |
Disables Caps Lock and swaps Scroll lock to be Caps Lock |
KillCapsLock.reg |
Disables Caps Lock |
DisableKeyboardRemap |
Uninstalls the preference by deleting the key |
Once you’ve applied one of these registry files, you’ll have to reboot your computer for it to work. To uninstall, you can use the uninstall registry tweak, or you can simply delete the Scancode Map key entirely.
It’s worth noting that registry hacks can cause problems with your system, and if you have an application that’s already done some keyboard remapping it’s possible that applying these registry hacks could break something. Use with caution.
Download Keyboard Mappings Registry Tweaks
In this tutorial, I’ll show you how to disable or remap (reassign) the Caps Lock key on your keyboard. Many people find they accidentally hit Caps Lock, leading to unintended uppercase letters and extra editing. Let’s see how to customize it!
Disable or Remap the Caps Lock Key with PowerToys
The recommended way to do this is by using Microsoft PowerToys. If you don’t have PowerToys installed on your computer, click the link below and follow the instructions.
How to Install PowerToys on Windows 10/11
After installing PowerToys, open it and navigate to «Keyboard Manager» in the left-hand menu.
Then, turn on the «Enable Keyboard Manager» toggle switch and click «Remap a key.»
In the Remap keys window, click on «Add key remapping.»
In the remap area, click the «Select» button on the left, and then press the Caps Lock key on your keyboard to select it.
Now, if you simply want to disable the Caps Lock key, select «Disable» from the bottom drop-down menu on the right.
For remapping Caps Lock to a different function, like Ctrl + C
, click the right «Select» button and press the desired shortcut key combination.
Disable Caps Lock Key with Registry Editor
Disabling Caps lock in the Registry editor is not recommended. But for your knowledge I will show you how to do it.
Launch the Registry Editor with administrator privileges and navigate to the following key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout
In the right pane, create a new Binary Value named Scancode Map
.
Then double-click on Scancode Map to open the Edit Binary Value window and type the following value:
00 00 00 00 00 00 00 00 02 00 00 00 00 00 3A 00 00 00 00 00
Once you’ve set the value, restart your computer for the changes to take effect. To re-enable Caps Lock, simply delete the Scancode Map
binary value.
Клавиша Ctrl
, являясь общим модификатором для большинства программных сочетаний клавиш, расположена довольно неудобно на клавиатуре. В то же время клавиша CapsLock
, которая редко используется, занимает привилегированное место на клавиатуре. За годы использования компьютера замена позиций клавиш Ctrl
и CapsLock
значительно улучшила мой комфорт и эффективность при использовании сочетаний клавиш.
Вот как поменять местами эти две клавиши с помощью команд PowerShell (должны выполняться от имени администратора):
$hexified = "00,00,00,00,00,00,00,00,03,00,00,00,1d,00,3a,00,3a,00,1d,00,00,00,00,00".Split(',') | % { "0x$_"};
$kbLayout = 'HKLM:\System\CurrentControlSet\Control\Keyboard Layout';
New-ItemProperty -Path $kbLayout -Name "Scancode Map" -PropertyType Binary -Value ([byte[]]$hexified);
Ссылки
- Remap Caps Lock to Control on Windows 10 — Эта ссылка пр��доставляет информацию о сопоставлении CapsLock с Ctrl, а не об их обмене местами.
Автор
Xianmin
Последнее обновление
2024-11-10
Лицензия
原创文章,如需转载请注明文章作者和出处。谢谢!
Поддержка
A big annoyance while typing on your computer keyboard is accidentally pressing the wrong key. A major culprit is the Caps Lock key because you can toggle it to turn upper case characters on without noticing, then type away in capital letters. Typing complete sentences or paragraphs with upper case characters is in many cases considered bad for readability. With emails, online forums and social media, typing everything in capitals is generally considered as SHOUTING.
Even if you are a competent typist and rarely hit other keyboard keys like Caps Lock by mistake, it’s still possible for the key to actually break, stop functioning or get stuck on. Some desktop and laptop keyboards can be of a low build quality and it doesn’t take much to get grit or dust under a key to cause it problems. Of course, you can continue to use the keyboard although everything might end up being in capital letters until do something about it.
There are different ways to sort this issue, including turning the Caps Lock key off altogether or remapping it to another key on the keyboard. Here we show you some ways to do it.
Disable Caps Lock From The Registry
In Windows it’s possible to remap one key on your keyboard to another, including Caps Lock. The main issue is there are no built in tools that allow you to perform this task. However, you can easily do this yourself if you are comfortable editing the registry. This method works by remapping Caps Lock to nothing which effectively disables it. Note this is a system wide setting so all user accounts will be affected by the change.
1. Open the Registry Editor by typing regedit into Start, then navigate to the following key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout
2. Right click on Keyboard Layout > New > Binary value, and name it ScanCode Map.
3. Double click on ScanCode Map and enter the following value data:
00 00 00 00 00 00 00 00 02 00 00 00 00 00 3A 00 00 00 00 00
4. Click OK and exit Regedit. Then restart the computer or logoff and logon. You will then find Caps Lock is completely disabled. This method works right up to and including the latest build of Windows 10. To reverse the process simply go back to the registry key and delete the ScanCode Map value.
To make things simpler so you don’t have to edit the registry yourself, download this small Zip file, unzip it and double click the Disable_Caps_Lock.reg to automatically import the ScanCode Map values into your registry. Use Enable_Caps_Lock.reg to reverse it.
The above method is easy enough, even if you don’t want to edit the registry yourself and use the registry files. Another easy way is disabling the Caps Lock key with a dedicated third-party tool.
Key Remapper
This all-in-one software is designed to remap keys, buttons, and mouse wheel actions to make your computer experience more pleasurable. If you’re looking for ways to disable or remap your capslock key, this tool is a great fit for that. For example, you can replace the CapsLock key with a “Middle mouse button” command or any other function you prefer.
Furthermore, you can also reverse map the CapLocks key with another function you use frequently. This remapping software gives the user more control over their keyboard by helping them eliminate non-useful keys.
Download Key Rempapper
Caps Lock Toggle
Caps Lock Toggle is a very simple, small and portable tool that has only one function, to toggle the Caps Lock state on or off at the click of a button. The developer Moosoft no longer hosts the program on their own website although it can be found for download elsewhere.
In reality Caps Lock Toggle simply checks the above ScanCode Mode registry value and writes or deletes its data if you press the button to disable or enable Caps Lock. While more advanced users might prefer the manual method this tool is very handy for inexperienced users because it’s just one button. Don’t forget a logoff and logon will be required for the change to be applied and users without full administrator rights will need to right click and run as administrator.
Download Caps Lock Toggle (via Softpedia)
NumLocker
NumLocker is a bit different because it sits in the system tray and allows you to turn on or off the Num Lock, Scroll Lock or Caps Lock keys with a couple of clicks. And it can do that without you having to log off the computer for the changes to take effect. Another advantage is the change is per user and not system wide like the registry tweak. One downside is it’s only available as a setup installer although you can get around this issue by extracting the NumLocker installer with 7-Zip.
After launching the program right click on its orange N icon in the tray. From there you can turn on or off any off the three lock keys either temporarily or for as long as the program is running. The state of the keys will be saved and loaded on next launch, an option to load on Windows startup is included in the menu. Although the website is now gone and NumLocker dates from 2008, it still works fine in Windows 10 and uses a reasonable 3MB of memory while sitting in the tray.
Download NumLocker (via Softpedia)
Remap Caps Lock to Another Key Using Software
Even though Windows lacks a built in tool to remap one key to another, there are third party tools available that can do it for you. In effect they use and expand on the ScanCode Map registry key method because the registry value itself can store mappings for several different keys at once.
KeyTweak
KeyTweak is another relatively old tool dating back to 2009. Luckily the settings to map different keys in the registry have been the same for many years, so it works on Windows 10. The good thing about KeyTweak is it shows a graphical representation of the keyboard and special extra keys. If you decide to map Caps Lock to another key, that makes it easier to visualize the most comfortable key. KeyTweak can be made portable by extracting its installer with 7-Zip.
Remapping Caps Lock is easy, click the key on the virtual keyboard (key 30) and then decide whether to disable it or remap it to another key. To disable Caps Lock entirely press Disable Key and then Apply. To remap Caps Lock click on the Choose New Remapping drop down and select the target key, then press Remap Key and Apply. The program will then popup a warning to say a restart is required although you can get away with logging off and back on. To reverse the procedure click Restore All Defaults or Enable Key. Note KeyTweak needs to be run as administrator.
Download KeyTweak
Key Mapper
What we quite like about Key Mapper is it’s a small portable executable and easy to use with just a few clicks required to remap or disable the Caps Lock key. This program also uses a virtual keyboard which makes things easier when remapping one key to another.
To disable or remap Caps Lock, all you have to do is firstly double click on it to bring up the mapping window. If you want to disable it fully just press the Disable button. Alternatively click on the groups, categories and lists to find what key you want to remap to (or press Capture and press the key) and press the Map button. Log off and back on for the mapping/disabling to take effect. Key Mapper requires the .NET Framework 3.5 to be installed from Optional Features in Windows 10 and 8.1
Download Key Mapper
We’ve listed 2 key remapping tools here but there are more available that can do a similar job, such as SharpKeys or MapKeyboard.
Disable Caps Lock Instant Toggle On or Off
If you are someone that just wants to turn off the Caps Lock key because it’s an annoyance and you keep pressing it by mistake, this last tool could be a solution. Created in AutoHotKey by 1 hour Software, CAPshift places a half second delay on the Caps Lock key so if you accidentally press it while typing, you won’t actually turn Caps Lock on. Holding Caps Lock for half a second to a second will toggle it on or off while holding down for more than a second will popup a menu.
The menu is also accessible from the tray icon right click and offers the options to turn Caps Lock on or off and to change the case of any selected text. This is a useful feature and can quickly change text to uppercase, lowercase or titlecase. CAPshift also adds half second delays to the F1, Insert, Num Lock and Scroll Lock keys. If you don’t want those keys to be affected, the settings ini file can be edited to turn them off. Caps Lock will be automatically turned off after 2 minutes of keyboard inactivity. CAPshift is portable and only consumes around 2MB while sitting in the tray.
Download CAPshift