From 4be51de5c252d1e6f621fcdd14de6acf9b4c43ce Mon Sep 17 00:00:00 2001 From: Louis Burda Date: Sun, 11 Aug 2024 21:28:18 +0200 Subject: Handle GLFW_REPEAT for shortcuts and backspace --- xnote.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xnote.c b/xnote.c index 06afd69..a554f42 100644 --- a/xnote.c +++ b/xnote.c @@ -242,7 +242,7 @@ mouse_press_cb(GLFWwindow *window, int button, int action, int mods) static void key_press_cb(GLFWwindow *window, int key, int scancode, int action, int mods) { - if (action == GLFW_PRESS) { + if (action == GLFW_PRESS || action == GLFW_REPEAT) { if ((mods & GLFW_MOD_CONTROL) && !strcmp(glfwGetKeyName(key, scancode), "z")) { if (event_count) undo(); } else if ((mods & GLFW_MOD_CONTROL) && !strcmp(glfwGetKeyName(key, scancode), "c")) { -- cgit v1.2.3-71-gd317