views:

1502

answers:

4

I'd like to have my command key work as a ctrl key in the Mac OS X terminal. That is, I want "command-c" to do the same thing as "ctrl-c". Does anyone know of a way to do this?

Specifically, I would really like this to work in emacs. Emacs uses a LOT of ctrl key bindings and reaching for the control key is beginning to strain my wrists. You may say that the command key is actually harder to reach, but I've swapped the command key and the caps-lock key on my MacBook Pro to make that easier.

Any help is appreciated!

A: 

I don't think this is possible because the command key is already mapped to a bunch of system-level shortcuts. For example Cmd-C is copy, Cmd-X is paste. I don't think an application can override those system commands.

Kyle

Kyle
A: 

Perhaps you could hack http://doublecommand.sourceforge.net/ for this purpose.

Alex Martelli
+2  A: 

I don't think that you can have the same key act as both command and ctrl, and I don't think that there's a way to override the keys for a specific program, at least not without a third-party program. Personally, I recommend having the command key once again be the one with the apple/command label, and using caps lock as your ctrl key as Emacs commands are more complicated (and require pressing multiple keys with ctrl held down).

By the way, if pressing the command key is difficult, you're probably trying to do so with your pinky and not your thumb.

As a side note, if you are using Emacs in the terminal, you may be interested in using option as meta. If you want to use your command key as meta, you can check out Carbon Emacs. It doesn't run in the terminal, but it might fill your needs.

Kyle Cronin
+1  A: 

You could (in Leopard) map the Caps Lock key to act as control for all apps.

System Preferences->Keyboard and Mouse->keyboard Modifier Keys button at bottom

Mark