# Child UMG Widget OnKeyDown

**URL:** <https://forums.unrealengine.com/t/child-umg-widget-onkeydown/373772>\
**Category:** UI\
**Tags:** child-actors, unreal-engine, Widget, question\
**Created:** [October 19, 2016, 8:58am UTC](https://forums.unrealengine.com/t/child-umg-widget-onkeydown/373772 "2016-10-19T08:58:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dennis\_Von\_Hedberg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dennis\_Von\_Hedberg](https://forums.unrealengine.com/u/Dennis_Von_Hedberg)\
**Post date:** [October 19, 2016, 8:58am UTC](https://forums.unrealengine.com/t/child-umg-widget-onkeydown/373772/1 "2016-10-19T08:58:23Z")

</div>

I use a UMG Widget as an options menu. In this menu I use child Widgets to handle the rebinding of input keys. In the child widget i use the OnKeyDown() function to read when a key is pressed and set it as the new input for that specific ActionName.

 ![111532-options.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/7/c/37c4fa721050d0e09b43f05f8f36f6795a773af5.png)

However if I press the Child widgets button to change a key and then press anywhere else the child widget loses its focus and doesn’t call the OnKeyDown() inside the child widget.

 ![111533-pressedtostartlistening.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/9/f/79f85ee0d9fea88b388e4b83179332c40e3540d7.png)

And thus the key remain unbound. So my question is how do I keep the focus on the child Widget til I have typed a key, or if anyone have a better solution for this kind of setup?

---

<div class="post-metadata">

**Author:** ![ItsKasper](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ItsKasper](https://forums.unrealengine.com/u/ItsKasper)\
**Post date:** [December 12, 2016, 8:16pm UTC](https://forums.unrealengine.com/t/child-umg-widget-onkeydown/373772/2 "2016-12-12T20:16:15Z")

</div>

I have the same problem. Did you found an answer yet?

---

<div class="post-metadata">

**Author:** ![Dennis\_Von\_Hedberg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dennis\_Von\_Hedberg](https://forums.unrealengine.com/u/Dennis_Von_Hedberg)\
**Post date:** [December 13, 2016, 12:24am UTC](https://forums.unrealengine.com/t/child-umg-widget-onkeydown/373772/3 "2016-12-13T00:24:47Z")

</div>

Yes I did. I added a new blank widget that I gave the focus which handles the input reading. I might do a tutorial of it if I find the time 🙂

---

<div class="post-metadata">

**Author:** ![ItsKasper](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ItsKasper](https://forums.unrealengine.com/u/ItsKasper)\
**Post date:** [December 13, 2016, 9:26am UTC](https://forums.unrealengine.com/t/child-umg-widget-onkeydown/373772/4 "2016-12-13T09:26:03Z")

</div>

I don’t really get how i should do that, so a tutorial would be awesome. Thanks! I’ll try to solve in myself in the meantime.
