Get Rid of CapsLock

Jan 17, 2010

There are no more useless key on a keyboard than CapsLock. I always map it to Control instead, that’s far more useful. This is a little reminder to myself on how to do it. Because I always forget.

Mac OS X

Open System Preferences, click on Keyboard and select the Keyboard tab. Click on the “Modifier Keys…” button in the lower right corner, and then set Caps Lock to whatever you want. I think you should want Control.

CapsLock

FreeBSD

Save the code below as /usr/local/etc/hal/fdi/policy/x11-input.fdi, and make sure you have hald(8) running (hald_enable="YES" in /etc/rc.conf).

<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- Save as /usr/local/etc/hal/fdi/policy/x11-input.fdi on FreeBSD -->
<deviceinfo version="0.2">
  <device>
    <!-- Allow Ctrl-Alt-Backspace to kill the X server.
      This is the old default behavior, which I prefer. -->
    <match key="info.capabilities" contains="input.keyboard">
      <merge key="input.x11_options.XkbOptions" type="string">
        terminate:ctrl_alt_bksp
      </merge>
    </match>
    <!-- Map CapsLock to Control. Can't be done in xorg.conf anymore.·
      From http://blog.zomgepix.org/2009/06/death-to-caps-lock.html -->
    <match key="info.capabilities" contains="input.keyboard">
      <merge key="input.x11_options.XkbOptions" type="string">
        ctrl:nocaps
      </merge>
    </match>
  </device>
</deviceinfo>

Sometimes hald(8) can be hard to kill completely, so reboot to make sure it works.

I found this tip on the zomg epix!!1 blog.

Windows

Paste the code below into a file ending in .reg and double-click it. Works at least up to Windows 8.1.

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

Then reboot.

Enjoy!


Last edited: May 1, 2016


Categories: