In iTerm2 map the left Command key to the left Control key & map Command+Tab

In iTerm2, can I map the left ⌘ Command key to the left ^ Control key and still map the system ⌘ Command ⇨Tab to still switch to all other windows?

I've use three different OS's (Ubuntu, macOS and Windows) regular and my subconscious is constantly wanting to switch windows using ⌥ Option⇨Tab.


While not answering the question I have discovered the following work around in the meantime for my most commonly used terminal "control+" inputs:

  • Ctrl+C - clear terminal line
  • Ctrl+R - reverse search

Set the remap modifiers in iTerm to default:

Remap modifiers in iTerm

Set the keybindings for Command+R, etc. to "Send Hex codes:" and enter the hex codes from http://ascii-table.com/control-chars.php as follows:

enter image description here

And viola it works for Command+R = Ctrl+R as required....to do the entire alphabet would require mapping multiple hex codes


Yes, it can be set in iTerm's Preferences → Keys → Remap Modifiers

Keys Remap Modifier

Next, in the same Preferences Pane, select Key Bindings Tab.

From there, you will see all the currently defined key bindings. If Control-Tab isn't defined you can create a new one, however this is a clean install and this is what's shown by default.

iTerm Key Bindings Tab

Double click on the "Action" description to modify the behavior.

It will bring up a (long) list of actions you can assign to the keybinding. (I selected "Cycle Tabs Forward")

iTerm Key Bindings Sub Menu

This will configure iTerm to accept the left ⌘ Command as ^ Control and is limited to iTerm only. ⌘ Command ⇨Tab still works, but within iTerm you must use the right ⌘ Command. Outside of iTerm, everything will function as normal.

If you're using Catalina, you will have to give Accessibility permissions to iTerm under System Settings → Security & Privacy → Privacy Tab → Accessibility if you haven't already done so.