Detect input outside editor utility widget focuse

Is there a way to detect input in an editor utility widget when it’s out of focus? (for example, detect mouse input in on viewport)