Jan 092013
 

The Caps Lock key is mostly just an annoyance. But there are ways to make it more useful. I recently found a very nice script by Gustavo Duarte called Home Row Computing which maps Caps Lock as a modifier key that lets you navigate in text Vim-style using H, J, K and L. This is very handy as you don’t have to move your hand back and forth to the cursor keys while typing. It also maps Home, End, Page Up, Page Down and Del to easy accessible keys from the home row.

The script required remapping the Caps Lock key to another key in the Windows registry though, so I started improving it a bit. I added some new functionality and customized it to my preferences. I also added another very handy function that lets you drag anywhere on a window to move it while holding Caps Lock, the way you can do while holding the Alt key on Linux. I got that feature from an article at How-to-geek, changed the key from Alt to CapsLock and added it to the script. Very handy indeed!

Below you can see the default mappings for the script, although it’s easy to change it if you like:

CapsLock binding keyboard layout small_spaceYou have access to all the common keys on the right side of the keyboard (Cursors, Home, End, PgUp, PgDn, Ins, Del) from your home row, which is very handy when typing! Common commands like cut-copy-paste, undo-redo, backspace-delete are also very easy to access giving less hand movement. You can still toggle caps lock if you need to by pressing the Windows Key + Caps Lock.

To use the script:

  1. Download and install Autohotkey.
  2. Download the script.
  3. Put the script (or a shortcut to it) in the Startup folder so that it runs each time you start you computer.

I chose keys that are consistently placed for QWERTY layouts, some keys might have to be changed for QWERTZ or AZERTY. Let me know in the comments if you have any suggestions or comments.

Update: If you like the regular cursor layout I made another version of the script:

CapsLock binding keyboard layout_ALTsmall_space
The cursor key layout should be more familiar than the Vim-style layout to most people, and much easier to learn.

Gist for the version I currently use: https://gist.github.com/Danik/5808330

Original keyboard layout graphic by Simon Kaupinmäki

 

 Posted by at 00:35
  • Pingback: Caps Lock key remapping script with regular cursor layout » Danik Games DevBlog()

  • http://www.facebook.com/yeh.chinkwan Alexander Yeh

    Haha, does that help you a lot mate? :)

    • http://Danikgames.com Danik

      I think it’s awesome! I have to get used to it though, because I do a lot of mistakes still (pressing Caps when I should be pressing Shift and vice versa), but that should go away with some practice.

  • http://twitter.com/pekuja Pekka Kujansuu

    This seems pretty cool. I currently have Caps Lock bound to Backspace, but perhaps this would be even better.

    • http://Danikgames.com Danik

      Let me know how it works out… I have been using it for some time now and I think it helps a lot. I don’t use the left hand shortcuts that much though, mostly the navigation, backspace/del and enter keys. Shift and contral are a bit awkward to use together with the navigation so I’m thinking of mapping them to some of the keys I don’t use much.

  • http://www.facebook.com/edw.hdez Eduardo Hernández

    Good stuff. The only issue I have had is that Caps Lock key doesn’t get sent to the remote machine when I use the Remote Desktop Connection client.