Hello everyone!
When I press the W and D keys at the same time on my USB keyboard, sometimes one of the key's GLFW_PRESS callback event is delayed. This also happens with other keys when they are pressed simultaneously. (I mostly use W-D and A-S since I'm making a twin-stick shooter and pressing these keys makes diagonal movement possible for the game)
I tested with vsync and without vsync. I also played around with the glfwPollEvents call frequency and call time (before glfwSwapBuffers after glfwSwapBuffers), but the same happens.
The delayed key's event eventually gets fired off but it looks like it comes when the first GLFW_REPEAT event fires of for it!
Here is what pressing the W and D keys simultaneously looks like.
GLFW_PRESS: 87 Engine Tick: 298
GLFW_PRESS: 68 Engine Tick: 313
GLFW_REPEAT: 68 Engine Tick: 314
GLFW_REPEAT: 68 Engine Tick: 315
GLFW_REPEAT: 68 Engine Tick: 316
GLFW_REPEAT: 68 Engine Tick: 316
That is a 15 frame delay and my engine is configured to run at 30Hz so the delay is around 500ms.
I'm on X11, Fedora 4.18.11-200.fc28.x86_64 with the latest LWJGL nightly. Java: 1.8.0_172
I also commented here:
https://github.com/glfw/glfw/issues/1112I think it might be an LWJGL issue since I built the native GLFW library with a simple test case and the problem does not show there.
Tested my code on windows and there is no issue there, so this might only show on linux.
Thank you for your help!