summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2024-08-11 21:28:18 +0200
committerLouis Burda <quent.burda@gmail.com>2024-08-11 21:28:18 +0200
commit4be51de5c252d1e6f621fcdd14de6acf9b4c43ce (patch)
tree0945f2d58fd95d0591dfb5767a3cec2872c4da4e
parent5b6b578d984f3c19c9e7701bba014a7fffe1aab7 (diff)
downloadxnote-4be51de5c252d1e6f621fcdd14de6acf9b4c43ce.tar.gz
xnote-4be51de5c252d1e6f621fcdd14de6acf9b4c43ce.zip
Handle GLFW_REPEAT for shortcuts and backspace
-rw-r--r--xnote.c2
1 files changed, 1 insertions, 1 deletions
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")) {