QoL Tip

If, like me, you are annoyed by having to mouse-click the X to end a Godot game, this is a good point to add an “exit” action bound to the Escape key. Then add in the following to your input-handling code:

if Input.is_action_just_pressed("exit"):
		get_tree().quit()

Cheers.

3 Likes

Not wrong.
By default, a project will contain the “ui_cancel” input action associated with the Escape key, so you could use it instead of creating a custom “exit” action.

1 Like

You can close the running scene by pressing Cmd+ on Mac. (I’m sure there is some other key binding on Windows)

Privacy & Terms