Merge pull request #34 from liamg/fix-page-up-down

Fix page up/down and application home/insert
This commit is contained in:
Liam Galvin 2018-10-23 20:16:49 +01:00 committed by GitHub
commit ab5c87efa8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 26 additions and 26 deletions

View File

@ -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{