GLFW (LWJGL) Input - Holding CTRL down blocks the CharCallback

Viewed 548

I try to implement a simple CTRL + V for some textfields inside my game. So I set a flag for CTRL in the KeyCallback whenever ctrl is pressed or released (i tested this one). When I try to type "V" now the CharCallback isn't called. Is it supposed to not work this way? If it is how do i do it right?

That's how I poll it inside the KeyCallback:

if(key == GLFW_KEY_LEFT_CONTROL && action == GLFW_PRESS) {
    controlPressed = true;
}
if(key == GLFW_KEY_LEFT_CONTROL && action == GLFW_RELEASE) {
    controlPressed = false;
}

I use glfwSetKeyCallback(...) to set the callback.

1 Answers
Related