From bc49bfe68e69f174f6d56906531ddbedba461b16 Mon Sep 17 00:00:00 2001 From: Elliot Saba Date: Mon, 27 Jun 2016 17:07:32 -0700 Subject: [PATCH] Send GLFW_REPEAT events through `keyPressEvent()` --- src/Magnum/Platform/GlfwApplication.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Magnum/Platform/GlfwApplication.cpp b/src/Magnum/Platform/GlfwApplication.cpp index 6b40eda54..9157d4593 100644 --- a/src/Magnum/Platform/GlfwApplication.cpp +++ b/src/Magnum/Platform/GlfwApplication.cpp @@ -168,7 +168,11 @@ void GlfwApplication::staticKeyEvent(GLFWwindow*, int key, int, int action, int _instance->keyPressEvent(e); } else if(action == GLFW_RELEASE) { _instance->keyReleaseEvent(e); - } /* we don't handle GLFW_REPEAT */ + } else if(action == GLFW_REPEAT) { + /* TODO: Give the user a cross-platform method of differentiating + between a key "press" and a key "repeat". */ + _instance->keyPressEvent(e); + } } void GlfwApplication::staticMouseMoveEvent(GLFWwindow* window, double x, double y) {