# How do I properly implement CommonUI custom back input action for widgets?

**URL:** <https://forums.unrealengine.com/t/how-do-i-properly-implement-commonui-custom-back-input-action-for-widgets/1244919>\
**Category:** UI\
**Tags:** unreal-engine, question\
**Created:** [July 30, 2023, 4:02pm UTC](https://forums.unrealengine.com/t/how-do-i-properly-implement-commonui-custom-back-input-action-for-widgets/1244919 "2023-07-30T16:02:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ElThundercloud](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ElThundercloud](https://forums.unrealengine.com/u/ElThundercloud)\
**Post date:** [July 30, 2023, 4:02pm UTC](https://forums.unrealengine.com/t/how-do-i-properly-implement-commonui-custom-back-input-action-for-widgets/1244919/1 "2023-07-30T16:02:42Z")

</div>

In common UI you push widgets to stack, then pop them either with a button or “back” action (typically escape). I want to pop widgets with custom actions, like inventory should be opened AND CLOSED with “I” button, player list with “P”, etc.

How do I properly set this up? I seriously couldn’t find anything about it. I’m using EnhancedInput.

---

<div class="post-metadata">

**Author:** ![HollyWretch](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@HollyWretch](https://forums.unrealengine.com/u/HollyWretch)\
**Post date:** [July 31, 2023, 10:26pm UTC](https://forums.unrealengine.com/t/how-do-i-properly-implement-commonui-custom-back-input-action-for-widgets/1244919/2 "2023-07-31T22:26:37Z")

</div>

So I don’t know about EnhancedInput since I’ve not used that before, but with CommonUI the only solution I could think of is to

1. Add an input action to your data table for each widget (e.g. ‘I’ for ‘Close\_Inventory’, ‘P’ for ‘Close\_PlayerList’, etc.)
2. Create a button class/blueprint based on CommonButtonBase
3. Place the button in your widget
4. Set the button’s triggering input action to the respective input action
5. Deactivate the widget on button press
6. Make the button invisible

---

<div class="post-metadata">

**Author:** ![ElThundercloud](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ElThundercloud](https://forums.unrealengine.com/u/ElThundercloud)\
**Post date:** [August 1, 2023, 8:41am UTC](https://forums.unrealengine.com/t/how-do-i-properly-implement-commonui-custom-back-input-action-for-widgets/1244919/3 "2023-08-01T08:41:02Z")

</div>

I ended up adding a property “CustomBackAction” to a subset of UCommonActivatableWidget and registering handle back action to it. Doesn’t seem to be fully functional in 5.2 but 5.3 promises full Enhanced Input support, so until then, I guess.

---

<div class="post-metadata">

**Author:** ![Ellminster](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ellminster](https://forums.unrealengine.com/u/Ellminster)\
**Post date:** [October 5, 2023, 2:23am UTC](https://forums.unrealengine.com/t/how-do-i-properly-implement-commonui-custom-back-input-action-for-widgets/1244919/4 "2023-10-05T02:23:51Z")

</div>

Thank you ! It’s solved my problem !
