In my normal terminal, F1-F4 keys produce ^[[11~^[[12~^[[13~^[[14~, but in tmux I get ^[OP^[OQ^[OR^[OS. I'd like them to behave the same in tmux so I don't have muck around with bindings for programs in tmux. I don't have PuTTY's Xterm R6 option on.I'm using putty-256color as my terminal type both from putty and in tmux to get around other keys being mismatched, though I still have to remap my arrow keys.Config is was:set -g default-terminal putty-256colorset -g terminal-overrides putty*:smkx@:rmkx@:kLFT5=\eOD:kRIT5=\eOC:kUP5=\eOA:kDN5=\eOB:kf1=\e[11~:kf2=\e[12~:kf3=\e[13~:kf4=\e[14~The rest of my config is unrelated cosmetic stuff. You can see I've tried to remap the 4 function keys back to original, but I haven't got it to work.I feel like I'm missing something fundamental, why can't my keys stay the same for every key inside and outside tmux, with the exception of prefix so these issues do not occur?EditMy problem still exists but I was missing something fundamental: default-terminal refers to the terminal type within tmux but terminal-overrides refers to the term type I'm connecting with, i.e. outside of tmux. (Yes, I feel stupid.)My config is now like so:set -g default-terminal screen-256colorset -g terminal-overrides putty*:kLFT5=\eOD:kRIT5=\eOC:kUP5=\eOA:kDN5=\eOB:kf1=\e[11~:kf2=\e[12~:kf3=\e[13~:kf4=\e[14~:smkx@:rmkx@F1-F4 still give me ^[[11~^[[12~^[[13~^[[14~ outside of tmux, and ^[OP^[OQ^[OR^[OS inside.
How to get the F1-F4 keys to behave normally in tmux
terminal;tmux;putty