From bd5f8c1e1019a1dd33900d1f7dbaac3cd0c28dfc Mon Sep 17 00:00:00 2001 From: Aubin Detrez Date: Sun, 4 Jun 2023 10:50:38 +0200 Subject: [PATCH] Fix Repeat ENTER/BACKSPACE keys GetCharPressed handles character repetition correctly, but GetKeyPressed didn't repeat keys (like ENTER and BACKSPACE). Repeting a key on GLFW_REPEAT fixes the problem --- src/rcore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rcore.c b/src/rcore.c index ee682e8b0..77502101e 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -5460,7 +5460,7 @@ static void KeyCallback(GLFWwindow *window, int key, int scancode, int action, i #endif // Check if there is space available in the key queue - if ((CORE.Input.Keyboard.keyPressedQueueCount < MAX_KEY_PRESSED_QUEUE) && (action == GLFW_PRESS)) + if ((CORE.Input.Keyboard.keyPressedQueueCount < MAX_KEY_PRESSED_QUEUE) && (action == GLFW_PRESS || action == GLFW_REPEAT)) { // Add character to the queue CORE.Input.Keyboard.keyPressedQueue[CORE.Input.Keyboard.keyPressedQueueCount] = key;