walles / moar

Moar is a pager. It's designed to just do the right thing without any configuration.
Other
587 stars 17 forks source link

keys.go: Allow alternative Home/End key encoding #160

Closed ilyagr closed 9 months ago

ilyagr commented 9 months ago

My setup is Tmux running in Alacritty on Debian Linux running on Chrome OS. Before this change, Home and End keys did not work for me inside Tmux. (Outside tmux, I don't think there was a problem).

I got the required sequences by running cat and pressing Home/End.

This looks similar to (or possibly the opposite of) https://github.com/walles/moar/commit/daafbcdac4cc826d670a58bf9a6f9ef495159997. The reference in that commit mentions these sequences for Home and End, these kinds of sequences were already used for Delete, PgUp, and PgDown.

For reference, the missing \x1b[2~ sequence would correspond to the Insert key.

ilyagr commented 9 months ago

Thanks for the quick review!