@ben #try this:
#then replace the print statements with whatever code you want to execute when you lose focus
#bear in mind none of these may work since I think they depend on the underlying OS... maybe... IANAE 😇
func _notification(what: int) -> void:
if what == NOTIFICATION_APPLICATION_FOCUS_OUT:
print("app focus out")
if what == NOTIFICATION_WM_WINDOW_FOCUS_OUT:
print("window focus out")
pass


🤖
🤖
🦹🚀🦄🚀🦹





