From f07ca0cca34f3c627f9a7c892ddfb4a7ed008de7 Mon Sep 17 00:00:00 2001 From: Liam Galvin Date: Tue, 23 Oct 2018 20:16:12 +0100 Subject: [PATCH] Fix page up/down and application home/insert --- gui/input.go | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/gui/input.go b/gui/input.go index 67c8730..fd2c533 100644 --- a/gui/input.go +++ b/gui/input.go @@ -127,33 +127,33 @@ func (gui *GUI) key(w *glfw.Window, key glfw.Key, scancode int, action glfw.Acti '3', '~', }) case glfw.KeyHome: - if gui.terminal.IsApplicationCursorKeysModeEnabled() { - gui.terminal.Write([]byte{ - 0x1b, - 'O', - 'H', - }) - } else { - gui.terminal.Write([]byte{ - 0x1b, - '[', - 'H', - }) - } + gui.terminal.Write([]byte{ + 0x1b, + '[', + '1', + '~', + }) case glfw.KeyEnd: - if gui.terminal.IsApplicationCursorKeysModeEnabled() { - gui.terminal.Write([]byte{ - 0x1b, - 'O', - 'F', - }) - } else { - gui.terminal.Write([]byte{ - 0x1b, - '[', - 'F', - }) - } + gui.terminal.Write([]byte{ + 0x1b, + '[', + '4', + '~', + }) + case glfw.KeyPageUp: + gui.terminal.Write([]byte{ + 0x1b, + '[', + '5', + '~', + }) + case glfw.KeyPageDown: + gui.terminal.Write([]byte{ + 0x1b, + '[', + '6', + '~', + }) case glfw.KeyEscape: if gui.terminal.IsApplicationCursorKeysModeEnabled() { gui.terminal.Write([]byte{