Iterm2 disable Command shortcuts

Solution 1:

You'll want to override iTerm's default shortcuts with your own shortcuts to "Ignore".

Go to Preferences > Key and press the + button at the bottom of the Global Shortcut Keys:

Global Shortcut Keys

Then add an entry for Cmd+K and choose "Ignore" for the action:

Entry for Cmd+K

This disables Cmd+K.

Solution 2:

Another useful option - you want to use Ctrl-C, Ctrl-V and Ctrl-Z in iTerm2, but you defined them globally on your Mac as Copy, Paste, Undo shortcuts.

To be able to use those shortcuts in iTerm2 to stop running command (ctrl-c), insert special character (ctrl-v) or put program into background (ctrl-z):

  • create shortcuts ctrl-c ctrl-v ctrl-z in iTerm2 - Preferences > Keys > + same as in above solution
  • instead of Ignore chose action "Do Not Remap Modifiers"

And now you can use ctrl-c for copy in rest of mac os and for break inside iTerm2.