How to remove keyboard focus from a widget?

There is an option to set focus on a widget but how do i remove the focus from it and set it back to the default/viewport without clicking on it with a mouse?
I want to toggle between a chatbox once i press enter and remove the focus once i send the message. Is this possible?

did u find any solution?

Yes I think there is a blueprint node called Focus to Viewport or something like that:

4 Likes

Set Focus to Game Viewport node worked for me.

Thanks for the reply, found it some time ago and it works like a charm.

Oh wow that was last year huh?
Anyway I am glad it worked. Could you do me a favor and mark my answer as Accepted?

Yeah, sure!

Thanks :slight_smile: