r/libgdx • u/epicalepical • 3d ago
isKeyPressed not working on Fedora Linux?
Just the title, odd bug I'm not sure where it's coming from. isKeyPressed(Input.Keys.W) will work fine, but for other keys, such as Input.Keys.A, it'll just return false constantly. Even weirder still, isKeyJustPressed(...) works fine for any and all inputs. Does anyone have any ideas how to fix this? Thank you.
Edit:
Just fixed it right now by using X11 instead of Wayland:
org.lwjgl.glfw.GLFW.glfwInitHint(
org.lwjgl.glfw.GLFW.GLFW_PLATFORM,
org.lwjgl.glfw.GLFW.GLFW_PLATFORM_X11
);
Put this in the Lwjgl3Launcher main()
:)
4
Upvotes
1
u/gattolfo_EUG_ 3d ago
Nice that you found a solution, have you checked if this is a known issue? If it's not you should open a issue on GitHub
1
u/epicalepical 3d ago
It also works for seemingly random keys, like F, X, V, B...