Unbind Escape from closing the game

I’m using LWJGL and every time I press escape the game closes. Is there a value I need to set to stop it from doing so? Thanks for the read/response.

Check your input code, your probably followed a tutorial that checks if escape is pressed then closes the game. You just need to remove those lines.

I don’t believe so, I’m pretty sufficient in terms of checking my code. I’ll double check one more just to verify, but I’m near positive I have not. Most of the framework I made, I’ve created myself.

The reason it is suggested that it is in your code, it because LWJGL does not actively listen for any key events. It just, like any application, responds to the window close request, which happens either through a mouse-click (window close-button) or a key-stroke (ALT-F4).

Check for any appearance of


System.exit(); //with 0 or 1 being passed as the variable

You probably have that hidden somewhere in your code.

Found it. It was hidden away in my main file. Forgot. :stuck_out_tongue: