summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRay <[email protected]>2022-09-25 14:09:28 +0200
committerRay <[email protected]>2022-09-25 14:09:28 +0200
commit2ef0b064e50279f84531fd265990f29327775dbf (patch)
treebfd09061fd3c17c091469b0a31fcd8d7ca2095e8
parentea87491a82a0fc778056d1538d37ec851e8e0fbe (diff)
downloadraylib-2ef0b064e50279f84531fd265990f29327775dbf.tar.gz
raylib-2ef0b064e50279f84531fd265990f29327775dbf.zip
Fix isssue #2718
-rw-r--r--src/rcore.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/rcore.c b/src/rcore.c
index 214b9509..c7986dfb 100644
--- a/src/rcore.c
+++ b/src/rcore.c
@@ -1952,8 +1952,6 @@ const char *GetClipboardText(void)
return NULL;
}
-
-
// Show mouse cursor
void ShowCursor(void)
{
@@ -5270,7 +5268,8 @@ static void KeyCallback(GLFWwindow *window, int key, int scancode, int action, i
else CORE.Input.Keyboard.currentKeyState[key] = 1;
// WARNING: Check if CAPS/NUM key modifiers are enabled and force down state for those keys
- if (((mods & GLFW_MOD_CAPS_LOCK) > 0) || ((mods & GLFW_MOD_NUM_LOCK) > 0)) CORE.Input.Keyboard.currentKeyState[key] = 1;
+ if (((key == KEY_CAPS_LOCK) && ((mods & GLFW_MOD_CAPS_LOCK) > 0)) ||
+ ((key == KEY_NUM_LOCK) && ((mods & GLFW_MOD_NUM_LOCK) > 0))) CORE.Input.Keyboard.currentKeyState[key] = 1;
// Check if there is space available in the key queue
if ((CORE.Input.Keyboard.keyPressedQueueCount < MAX_KEY_PRESSED_QUEUE) && (action == GLFW_PRESS))