I have it set up so that my project runs on my second monitor in full screen mode.
Is there a way to focus the running project after pressing “Run Project (F5)” so that my inputs don’t register in the text editor? It’s very easy to miss.
func _ready() -> void:
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
# make the game grab focus so I don't accidentally type "dddddaaaawssssddd"
Hmmm, this works but only if I don’t use full screen mode. When I change the mode back to fullscreen, the editor still registers keystrokes. Might this be a bug?
I works it’s fine for now but I would prefer fullscreen.
How were you able to get it to run on your second monitor in the first place? The default behavior for me is to open on the same monitor as the Godot editor always.
I threw together a quick minimum reproduction project and wasn’t able to replicate. Still was able to get focus and input in the running project when I ran it, didn’t need to use Input.mouse_mode or get_window().grab_focus(). Feel free to clone and test for yourself.
this is happening to me on ubuntu, very annoying. game instance window should get focus after hitting run, but the script window keeps it so my game’s running in the foreground but all my WASD inputs go into the script window.