Why is terminfo[kcuu1] = '\\EOA'?
From what I can tell reading terminfo(5) , kcuu1 should be the sequence that the terminal sends when the up arrow is pressed. I have never, ever seen that be anything other than ^[[A (speaking now about cat , messed up terminal settings, etc). So, given that the terminals I've used (rxvt, gnome-terminal, iTerm) all default to TERM=xterm, why isn't kcuu1 \E[A ? I see that cuu1 is \E[A , but (from the man page, again), that's the string that I should send to the terminal to move the cursor, not a string the terminal sends to me. BTW this is with OS X. melpomene Arrow and other special keys