Home and End keys in Emacs don't work when run from Tmux
- by Jan Stolarek
When I run Emacs from Tmux, the Home and End keys do not work (Home key runs the Search command as if C-s was pressed). The problem started when I added this in my ~/.bashrc file:
TERM="xterm"
export TERM
I've read somewhere that TERM variable should not be set manually but this was the only way I was able to solve problems with colors. Without this setting I got different colors in Emacs when running directly from the terminal and different when running from Tmux. This option caused some of the keys not to work in Emacs when it was run from Tmux, so I added this line to my ~/.tmux.conf:
set-window-option -g xterm-keys on
This solved problem with all keys except for Home and End. Any ideas how to make these keys work again?