views:

265

answers:

4

OK, so I know I can remap the Caps Lock key in Windows registry, but is there something useful I can map it to in the Delphi 2009 IDE? I was hoping for Code Completion (Ctrl-Space), is there a way to map the single Caps Lock key to a Ctrl-key combination?

+2  A: 

There is a useful section in the GNU Emacs FAQ For MS Windows. Emacs users like to map Caps Lock to the Ctrl key, and it should prove useful as a starting point to assigning other key combinations.

Edit: Following the trail led me to this (official) documentation page: Scan Code Mapper for Windows. Hopefully the information it contains is still relevant.

Alex Barrett
+1  A: 

Can't you first map it some obscure non-modifier-key in the registry, then map that to the desired function in Delphi using the keyboard preferences thingy?

svinto
A: 

I personally tried the emacs-style: binding Caps Lock to the Ctrl key.

The upside is that a lot of very common actions (not just in emacs, but everywhere) can be performed with less hand moving. As just on example, deleting words backwards (which is done by Ctrl+backspace) got a whole lot easier, and it is a shortcut that works just about everywhere. For this alone, I'd map Caps Lock to the Ctrl key.

The downside here is the same as for any other non-standard modification (like Dvorak): it makes it much harder to user other people's computers. When you sit down there, you're going to definitely have a problem changing your typing instincts.

I ended up returning the Caps Lock to it usual job because I couldn't cope with not being able to type at other people's computers.

Edan Maor
I also discovered there were some applications (games) in which the caps lock key was actually useful.
Alex Barrett
Yeah, I had the same problem actually, so I had a way of swapping between them (with reg files, if I remember). A much better method which I didn't know about at the time was what ash said, using AutoHotKey.
Edan Maor
+5  A: 

Do yourself a favour and just download Autohotkey. This will allow you to remap the CapsLock key to absolutely any other key combination or action.

It can also do this on an application context sensitive basis (ie CapsLock automatically does different things based on the active window).

Ash
Good call - AutoHotkey is an extremely useful utility.
Alex Barrett
Tried out Autohotkey, looks as if it does the trick. And whole bunch more stuff to boot. Cheers
HMcG