I'm trying to make iTerm2 and tmux play nicer with eachother (without using the builtin tmux functions; I'd like my windows and panes managed by myself).

Therefore, I want to map + to a key sequence starting with ^Q (my tmux prefix), followed by .

^Q is 0x11, and is ^[[C, i.e. 0x1b 0x5b 0x43. However, if I try to make this mapping in the iTerm Preferences (Keys→Key Mappings, with the "Send Hex Codes" setting), it doesn't work, i.e. it doesn't switch my panes as I would expect.

Key mapping that doesn't work

If, shortly after pressing + I press again, the active pane to the right is selected, so the ^Q must be coming through. If I just map it to 0x1b 0x5b 0x43 (), it works, too.

Is this a limitation of iTerm2 itself; can I not send longer key sequences? Is it sending the keys too fast for tmux?

I also tried using the "Send with vim special keys" setting, but it doesn't seem to work at all; if I enter "<C-Q><Right>" it sends that text literally.

iTerm2 Build 3.0.8 on macOS Sierra.

1 Answer 1


I found this on iTerm2's FAQ page. I'm not sure if it answers your question. Let us know.

enter image description here

  • Sadly it doesn't. $TERM, and the terminal type setting are both xterm-256color. My arrow keys are working fine, as I wrote I can even map a key combination to send an arrow key escape sequence, just not Control-Q and and arrow key escape sequence. I have cursor application mode turned off.
    – L3viathan
    Commented Sep 28, 2016 at 0:16

You must log in to answer this question.

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