From 3d1517f636d8efb3fbf61ba2157b33c392bf837f Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Thu, 15 Aug 2024 23:17:11 -0400 Subject: [PATCH] fix Home and End key behavior in tmux Add support for "VT220-style function keys" (similar to the existing escape sequences for Home and End, but with a different numeral in the middle) See discussion on #67. --- terminal.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/terminal.go b/terminal.go index 5ba31ea..b3fa563 100644 --- a/terminal.go +++ b/terminal.go @@ -386,9 +386,9 @@ func (t *terminal) consumeANSIEscape(buf *bufio.Reader, ansiBuf *bytes.Buffer) ( switch string(ansiBuf.Bytes()) { case "3": r = MetaDeleteKey // this is the key typically labeled "Delete" - case "7": + case "1", "7": r = CharLineStart // "Home" key - case "8": + case "4", "8": r = CharLineEnd // "End" key } }