Mac OS X Terminal - Remap Command Keys

Is there a way to remap command keys just for Terminal.app in Mac OS X? I know that I can remap keys at the system level, but I'd like a way to do it just for the Terminal app.

Ideally I'd like command key remapped to ctrl, and capslock remapped to option (meta).


Solution 1:

I believe you can do this on a command-by-command basis in System Preferences but it would take a LONG time to update all the command key equivalents!

Solution 2:

I know you asked for the terminal commands to remap keys, but I thought this would be of more use to you.

This is a program that you may use to automate remapping keyboard keys. Once you change the assignments as desired, the program will apply the new key mappings via terminal commands.

If you want to view how he does this, you can check out the source code supplied.

Here is the developer's website KeyRemap4MacBook

Solution 3:

Just wanted to ask if you realized that having CMD and CTRL keys be separate allows for ease of using the clip board? I imagine there are tricks to get around this, but on other OSes I usually have to select text then right click on the mouse and then click Copy. With Terminal.app I can comfortably just select text and CMD+C

But I imagine you have your reasons. Just figured I'd mention that.