I use Terminal.app on OS X, and I want to bind ctrl-left/right to cycle through tmux windows (like I did with screen).
The tmux incantation is easy to find online:
bind-key -n C-Left prev
bind-key -n C-Right next
This doesn't work though, because Terminal.app is sending
^[[5D for left instead of what tmux expects. In my case, with
TERM=xterm-256color, tmux is expecting
^[[1;5D for C-Left and
^[[1;5C for C-Right. You can change this in the Terminal.app settings. Ideally Terminal.app would magically send the right values based on the
TERM setting, if there is such a thing as the right values in the world of terminfo and modified arrow keys.
I would prefer to tell tmux to accept
^[[5D instead of
^[[1;5D, which is what I did in my screen config, but I can't see any way to tell tmux to take a raw escape sequence instead of logical keys. I prefer that so that I don't have to remember (or research) magical incantations to configure Terminal.app the next time I start from scratch on OS X. So if you know how, let me know.