Posted almost 6 years ago. Visible to the public. Linked content.

TMUX HOME END not working

I had a problem under OpenSuSE 13.1 with tmux 1.8-2.1.2 the home and end buttons did not work. It took me so long to find a solution but finally here it is, original link attached.

There is a nice tool called tput which can display the key sequence values that the system receives when a user hit a button, and another one bind which can map key sequences to another. This way it easy to spot that under tmux the system receives different sequence.

Test it like this:

Copy
$ cat -v # pressing home, then end ^[[1~^[[4~ $ tput khome | cat -v; echo ^[OH $ tput kend | cat -v; echo ^[OF

And to make home and work again under tmux one needs to add these lines to ~/.bashrc:

Copy
if [[ -n "$TMUX" ]]; then bind '"\e[1~":"\eOH"' bind '"\e[4~":"\eOF"' fi

Owner of this card:

Avatar
Bonyiii
Last edit:
almost 6 years ago
Posted by Bonyiii to Bonyiii's deck
This website uses cookies to improve usability and analyze traffic.
Accept or learn more