- Edited
I used ...
func _input(event):
print(event)
... in my main scene to test this, in both Godot 3.5 and Godot 4. On ALL projects so far in Godot 4 the keyboard does not trigger any input events until AFTER I have alt-tabbed out of the game and back into it OR the keyboard does not trigger any input events until after I have clicked the mouse at least once somewhere in the game window. This behavior does not occur on any of my projects in Godot 3.5. This behavior ONLY occurs in Fullscreen and Fullscreen Exclusive modes, in Godot 4. Windowed projects register keyboard events perfectly.
I am tearing my hair out trying to work out the cause. Any suggestions would be appreciated.
P.S. It doesn't matter what my code is. This happens even in a completely blank project in Godot 4, with only the two lines "func _input(event):" followed by "print(event)." in the main scene. (Also the behaviour occurs when running in both the editor and when running an exported project.)
EDIT TO ADD: Found something odd that I'm sure is related. Keypresses that I do before clicking or alt-tabbing are showing up in the GDSCRIPT EDITOR. So I'm guessing the issue has something to do with focus?