aboutsummaryrefslogtreecommitdiff
path: root/src/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core.c b/src/core.c
index 870ca3b4..6b2321c2 100644
--- a/src/core.c
+++ b/src/core.c
@@ -1735,10 +1735,11 @@ static void KeyCallback(GLFWwindow *window, int key, int scancode, int action, i
TakeScreenshot();
}
#endif
- else currentKeyState[key] = action;
-
- // TODO: Review (and remove) this HACK for GuiTextBox, to deteck back key
- if ((key == 259) && (action == GLFW_PRESS)) lastKeyPressed = 3;
+ else
+ {
+ currentKeyState[key] = action;
+ if (action == GLFW_PRESS) lastKeyPressed = key;
+ }
}
// GLFW3 Mouse Button Callback, runs on mouse button pressed