I use Iterm2 on the Mac. Many times, I accidentally press Command+some key, so I'm wondering, is it possible to disable the Command shortcuts? Like Command+D for example, as I use tmux for split panes.

  • the most annoying of these accidents is ⌘+Q since Q is just next to Tab. The ignore shortcut below also works to disable this – Ciprian Tomoiagă Oct 31 '18 at 13:29

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.

| improve this answer | |
  • In my case I need to bubble the shortcut action up to the OS. Ignore seems actually stop it. Any solution for this? thanks – masciugo Mar 11 at 7:54

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.

| improve this answer | |

You have the option to remap a key in iTerm2 to send an escape sequence. In your case, to remap +D to send Esc+D, select the action Send Escape Sequence and provide the sequence of characters that should follow the Escape character to be sent to the terminal. enter image description here

| improve this answer | |

You could just go to Preferences > Keys and manually delete every shortcut with Cmd.

| improve this answer | |
  • 2
    Those commands are not listed – mollerhoj Mar 15 '13 at 17:09
  • 1
    Please delete this answer. It is wrong and misleading. – Behrang Saeedzadeh Mar 10 '14 at 9:09
  • @Behrang we don't delete wrong answers for that reason alone. Can you explain he harm here or better, why exactly this is wrong. – bmike Mar 10 '14 at 12:35
  • 2
    The Preferences > Keys panel does not contain an entry for Cmd+K so there's nothing to delete that can fix this issue. – Behrang Saeedzadeh Mar 10 '14 at 14:43
  • Yes, the harm here is the possibility of a user wasting time trying to use this answer when, in fact, it cannot possibly work. – Br.Bill Aug 29 '19 at 17:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .