From b52b074be58f1cfcbaeebeb2e0f538765fd0f910 Mon Sep 17 00:00:00 2001 From: Grzesiek11 Date: Fri, 24 Nov 2023 18:04:13 +0100 Subject: [PATCH] Documentation: only named keys generate synthetic key releases The current wording states that all keys have synthetic key release events generated after focus is lost, but keys that aren't named don't have any state held, so no such events are generated for them. The new wording clarifies that only named keys have the events generated for them. (cherry picked from commit dbe810e4036fa6640fbe5d509e1a551c8a77f371) --- CONTRIBUTORS.md | 1 + include/GLFW/glfw3.h | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 569c486a..140ba527 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -254,6 +254,7 @@ video tutorials. - Jonas Ådahl - Lasse Öörni - Leonard König + - Grzesiek11 - All the unmentioned and anonymous contributors in the GLFW community, for bug reports, patches, feedback, testing and encouragement diff --git a/include/GLFW/glfw3.h b/include/GLFW/glfw3.h index 90fcaec5..828f5bda 100644 --- a/include/GLFW/glfw3.h +++ b/include/GLFW/glfw3.h @@ -4553,9 +4553,9 @@ GLFWAPI void glfwSetCursor(GLFWwindow* window, GLFWcursor* cursor); * [character callback](@ref glfwSetCharCallback) instead. * * When a window loses input focus, it will generate synthetic key release - * events for all pressed keys. You can tell these events from user-generated - * events by the fact that the synthetic ones are generated after the focus - * loss event has been processed, i.e. after the + * events for all pressed named keys. You can tell these events from + * user-generated events by the fact that the synthetic ones are generated + * after the focus loss event has been processed, i.e. after the * [window focus callback](@ref glfwSetWindowFocusCallback) has been called. * * The scancode of a key is specific to that platform or sometimes even to that