CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Jean-Paul S. Boodhoo

Develop With Passion

Score 1 For Eliminating your hands flight path

For the last couple of weeks, I have been integrating Vim and a complementary set of tools into my development toolkit. I am firmly on board with what the pragmatic programmers say:

"Learn a good editor, and learn it well!!"

I am thoroughly impressed with Vim, Viemu etc. Last week I was recommended a registry hack that would allow my Caps Lock key to have the same behaviour as the ESC key. This results in a much smoother experience when using Vim.

So far, I am loving the reg hack and much prefer the need to not have to move my hand to hit the ESC key. Here is the text of the reg 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,01,00,3a,00,00,00,00,00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybCodes]
"00000804"="ch"
"00000408"="gk"
"00010408"="gk"
"00020408"="gk"
"00050408"="gk"
"0001041f"="tr"
"0000041f"="tr"
"00000423"="us"
"00000402"="bg"
"00000419"="ru"
"00010419"="ru"
"00000c1a"="us"
"00010c1a"="us"
"00000422"="us"
"00010402"="us"
"00020402"="bg"
"00030402"="bg"
"00020422"="us"
"00000412"="ko"
"00000425"="et"
"00000426"="us"
"00010426"="us"
"00000427"="us"
"00000411"="jp"
"00000404"="ch"
"0000041C"="us"
"0000041a"="yu"
"00000424"="yu"
"00000405"="cz"
"00010405"="cz"
"0000040e"="hu"
"0001040e"="hu"
"00000415"="pl"
"00010415"="pl"
"00000418"="ro"
"00010418"="ro"
"00020418"="ro"
"0000041b"="sl"
"0001041b"="sl"
"00000442"="tk"
"00000813"="be"
"0000080c"="be"
"00001009"="us"
"00000c0c"="cf"
"00010c0c"="cf"
"00000406"="dk"
"00000413"="nl"
"0000040b"="su"
"0000040c"="fr"
"00000407"="gr"
"00010407"="gr"
"0000040f"="is"
"00001809"="us"
"00000410"="it"
"00010410"="it"
"0000080a"="la"
"00000414"="no"
"00000816"="po"
"00000416"="br"
"0000040a"="sp"
"0001040a"="sp"
"0000041d"="sv"
"0000100c"="sf"
"00000807"="sg"
"00000809"="uk"
"00010409"="dv"
"00030409"="usl"
"00040409"="usr"
"00020409"="us"
"00000409"="us"
"00000452"="uk"
"0000046e"="sf"

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout\DosKeybIDs]
"00010408"="220"
"00020408"="319"
"0001041f"="440"
"0000041f"="179"
"00010415"="214"
"00000442"="440"
"00000410"="141"
"00010410"="142"

Create a reg file and copy the contents into it, then merge the file into your registry. Make sure that you want to not have normal use of your caps lock key.

Develop With Passion!!


Published Apr 14 2008, 09:59 PM by bitwisejp
Filed under: ,

Comments

Jordi Fita said:

I also mapped the Caps Lock to ESC, but instead of creating the registry file I've used SharpKeys (www.randyrants.com/sharpkeys) instead.

# April 15, 2008 2:21 AM

Ray said:

Is that Vim that really good?

# April 15, 2008 4:19 AM

Aaron S. said:

I removed the Caps Lock and Insert keys from my keyboard due to nothing good ever coming from having bumped them.

# April 15, 2008 8:56 AM

Chris Hefley said:

Anyone know how to make it work in Vista (64) ?

Ray: yep, it's that good. After the first couple of weeks, anyway.

# April 15, 2008 8:59 AM

The Other Steve said:

CapsLock is supposed to be where the Ctrl key is.  That's how the old keyboards used to be.

# April 15, 2008 9:07 AM

indomitablehef.com » Blog Archive » Ludicrous speed? Sir, we’ve never gone that fast before! said:

Pingback from  indomitablehef.com  » Blog Archive   » Ludicrous speed? Sir, we’ve never gone that fast before!

# April 15, 2008 9:39 AM

Kyle Baley said:

I'm a fan of AutoHotKey: www.autohotkey.com. I use it mostly to map WindowsKey combinations (Win+N = Notepad, Win+G = GMail, etc) but you can also create pretty elaborate scripts for it. There's even one available that lets you use the arrow keys to control your mouse cursor.

Here's the script to map Caps Lock to Esc if you try it out:

CapsLock::Esc

# April 15, 2008 10:47 AM

Mark Hildreth said:

I do the same thing (capslock -> Escape). For XP, I use KeyTweak. It's not feature-full, but it's free and gets the job done.

# April 15, 2008 9:33 PM

Germán Schuager said:

Which is the function of the ESC key in vim that you need to use it so often?

# April 16, 2008 11:31 AM

passion ru said:

Pingback from  passion ru

# April 30, 2008 10:25 AM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add
Check out Devlicio.us!