Menu button for close

Hello,
I have created a buymenu. I just hit B key and it pops up. However when it’s in my viewport It doen’t take my any action keys. So how can I make that when I am in a buy menu then I hit B again and it removes the widget from parent? Thanks.

If you are using a Widget blueprint, you’re gonna have to set what the keys you want to what you would like them to do in the blueprint. Also, to go back to a previous widget blueprint on the back button set Remove All Widget Interfaces then Create Widget to the one you want to go back to.

I did all of that. Everything works until the widget is created. So I have B key to create a widget and add it to viewport. But when it does I can’t use any action events. So for example I have buy menu on B and midgamenu on Escape. I hit B and then when I hit escape nothing happens. So what do I need to do when I want to close that buymenu with B key? Thanks.

Did you set B to Close All Widgets then Create A Widget then Add To View Port?

yes I did.

Could you post a screenshot of how you did it?