I've got a TitleScreen (Controller) scene with an gui_input Signal. The handling looks like this:
func debug_InputEvent(aMessage, event):
if event is InputEventKey: eventStr = "InputEventKey"
elif event is InputEventMouseButton: eventStr = "InputEventMouseButton"
#elif event is InputEventMouseMotion: eventStr = "InputEventMouseMotion"
elif event is InputEventJoypadMotion: eventStr = "InputEventJoypadMotion"
elif event is InputEventJoypadButton: eventStr = "InputEventJoypadButton"
elif event is InputEventScreenTouch: eventStr = "InputEventScreenTouch"
elif event is InputEventScreenDrag: eventStr = "InputEventScreenDrag"
elif event is InputEventAction: eventStr = "InputEventAction"
elif event is InputEvent: eventStr = "Unhandled InputEvent"
print(aMessage + eventStr)
I would expect when i hit the escape key that i get a print out of InputEventKey or InputEventAction, instead its always Unhandled, because of commented out mousemotion.
How do i catch a keystroke?