User Tools

Site Tools


windows:keymaps

This is an old revision of the document!


Aim

  • Swap (left) control and caps lock
  • Swap “ and @

Rationale

Caps lock and control

If you are used to the standard keyboard layout, the most likely reason for wanting to move the control key is to avoid RSI in your left wrist. If you use ctrl-combinations often, particularly with letters towards the left of the keyboard, you will find yourself bending your wrist sharply for extended periods, which often causes pain in the left hand, wrist and lower arm. Various old school systems used to place the left control key where caps lock now is on most systems, which is much more comfortable and convenient, so most OSes still have a facility to switch the left control and caps lock keys over for those used to this layout. A secondary benefit is that this moves the caps lock key out of the way, so it isn't accidentally struck when aiming for “a” (a problem that some keyboards try to address by creating a gap between the two keys). KDE offers dozens of different options for moving the control key around, if the control/caps lock switch doesn't appeal.

" and @

If you're British and work outside the UK but in a partly English-speaking environment, there's a good chance you'll end up splitting your time between British and American keyboards. The most noticeable annoyance involved is that the British keyboard reverses ” and @ (although not on most Macs, so if you split your time between PC and Macs in the UK you may have the same problem). If you're able to touchtype all symbols then you may prefer just to use a US keymap everywhere. If you're not, you will probably want a British-ish keymap for use on British keyboards, so that you can find symbols like \ | # ~ ` ¬ that differ between the maps. You probably don't want to use a British keymap on a US keyboard, because it doesn't have enough keys so you will lose access to symbols that are important, at the least, to programmers.

One solution is to use an alternative British keymap that reverses “ and @ on British keyboards and a standard US layout on American ones. Some symbols will be in different places, but the location of these keys varies between physical keyboards anyhow, and they will at least be labelled correctly. A side-benefit is that most people prefer the US location of ” on the home row, as it is a much more important character than @.

Dead Keys

Caps Lock and Control

Two pieces of software can be used to change keyboard layouts. Keytweak can be used to remap any keys globally, including caps lock/control. It does this by editing the registry. The following registry keys are equivalent to its output, in case they do exactly what you need.

swap-caps-lock-control.reg
REGEDIT4
 
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,1d,00,3a,00,3a,00,1d,00,00,00,00,00
remove-keymap-modifications.reg
Windows Registry Editor Version 5.00
 
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=-
swap-caps-lock-control-and-backspace.reg
REGEDIT4
 
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,04,00,00,00,1d,00,3a,00,3a,00,1d,00,0e,00,1d,e0,00,00,00,00

@ and "

Keytweak can't be used to swap “ and @ because they are not keys (it could swap 2 and ' along with their shifted values). However, a new keyboard layout can be created using Microsoft Keyboard Layout Creator. This is designed for creating foreign language layouts, and so doesn't permit you to move “special” keys like control and caps lock around. But it has the benefit that it can change the layout for just one user of the system, and can be swapped easily in the same way that you would swap between standard layouts for different languages. The Creator seems to hang for a while on Windows 7, but does actually work fine if you have a lot of patience, and will compile (separate bits of) code good for 64 bit as well as 32 bit systems. Here's just the layout:

windows/keymaps.1302193416.txt.gz · Last modified: 2019/11/07 17:58 (external edit)