MacOS – Make Cmd+C do both Copy and Stop in the terminal

keyboardmacosterminal

Left control Key located in a very unpleasant place on my Mac keyboard.
It's hard to reach in the terminal.
Luckily, I don't need it very often: I have Cmd for most of the things.
There are few cases, where I need it:

Ctrl+R for reverse history search
Ctrl+C to kill a process or discard a line

I found Karabiner and it helped with reverse history search remapping.
But Ctrl+C puzzles me.

I know that on unix I can use Ctrl+C for both Stop and Copy in the terminal. And it determines what to do from the context: if there is anything selected, copy it. Otherwise, stop command or discard the user input line.

How I can achieve it on OS X with Cmd key?

Best Answer

The temporary workaround to this


It is possible to remap keys on any program in System Preferences > Keyboard > Shortcuts > App Shortcuts. Click the plus icon, and select terminal in the application drop down. Then type the name of the function (Copy in this case), and then highlight the shortcut box, and press a desired combination. The window should look something like so:

enter image description here

The above is just an example. This can be applied to virtually any situation and application