vtgl

terminal emulator implemented in OpenGL
git clone anongit@rnpnr.xyz:vtgl.git
Log | Files | Refs | Feed | LICENSE

Commit: cec0499bd52edb679930f506c4d154d0d80770d8
Parent: c6d3f5262b88548410a0a49408b605f3021636f7
Author: Randy Palamar
Date:   Tue, 20 Aug 2024 07:55:14 -0600

send the variable for PAGE_UP/DOWN in altscreen

Diffstat:
Mvtgl.c | 12++++++++++++
1 file changed, 12 insertions(+), 0 deletions(-)

diff --git a/vtgl.c b/vtgl.c @@ -424,6 +424,18 @@ key_callback(GLFWwindow *win, i32 key, i32 sc, i32 act, i32 mods) else os_child_put_s8(t->child, s8("\x1B[D")); break; + case ENCODE_KEY(GLFW_PRESS, 0, GLFW_KEY_PAGE_UP): + case ENCODE_KEY(GLFW_REPEAT, 0, GLFW_KEY_PAGE_UP): + if (mods & GLFW_MOD_CONTROL) os_child_put_s8(t->child, s8("\x1B[5;5~")); + else if (mods & GLFW_MOD_SHIFT) os_child_put_s8(t->child, s8("\x1B[5;2~")); + else os_child_put_s8(t->child, s8("\x1B[5~")); + break; + case ENCODE_KEY(GLFW_PRESS, 0, GLFW_KEY_PAGE_DOWN): + case ENCODE_KEY(GLFW_REPEAT, 0, GLFW_KEY_PAGE_DOWN): + if (mods & GLFW_MOD_CONTROL) os_child_put_s8(t->child, s8("\x1B[6;5~")); + else if (mods & GLFW_MOD_SHIFT) os_child_put_s8(t->child, s8("\x1B[6;2~")); + else os_child_put_s8(t->child, s8("\x1B[6~")); + break; } }