In Tmux I have assigned Alt+Arrows combinations (M+Left, M+Right, etc) to switch between panes. It's working ok in most cases.
But after changing pane with one of the Alt+Arrow combination every Esc press just repeats last Alt+Arrow assigned command.
For instance, if I move to a pane with M+Left, now every Esc press recognized as M+Left, so it cycles horizontally from right to left. Same for M+Up / M+Down, but vertically.
I'm using Esc in vim like a lot.
Needless to say this weird thing makes life hard, because now it's impossible to exit insert mode in normal way.
How it goes with vim (vim inside tmux inside urxvt):
If I open vim, start Insert mode, edit file, and exit Insert mode with Esc key, everything goes fine.
But if after entering Insert mode I move to another pane and back with Alt+Arrow combinations, it become impossible to exit Insert mode.
It only happens in Urxvt, can't reproduce in Xterm.
It affects only Alt-Arrow commands, vim-like binding for pane changing (M-h, M-j, etc) not affected.
urxvt 9.22, Tmux (2.2 based I believe, it's in OpenBSD core)
I've spend hours to investigate the problem and found no solution.
I suppose it have something to do with Esc behave like Meta in urxvt, but what it means
like in my case and how to address the problem I'm out of ideas.