# esc key action in UMG

**URL:** <https://forums.unrealengine.com/t/esc-key-action-in-umg/359803>\
**Category:** UI\
**Tags:** key, unreal-engine, action-mappings, question, UMG\
**Created:** [June 6, 2016, 9:36am UTC](https://forums.unrealengine.com/t/esc-key-action-in-umg/359803 "2016-06-06T09:36:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_2c124cb81](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2c124cb81](https://forums.unrealengine.com/u/anonymous_user_2c124cb81)\
**Post date:** [June 6, 2016, 9:36am UTC](https://forums.unrealengine.com/t/esc-key-action-in-umg/359803/1 "2016-06-06T09:36:52Z")

</div>

Hi,

I know it’s a simple question, but how can I access my input mappings through UMG, like I can access them in any other actor blueprint? I’d like for the user to be able to press the ESC button on the keyboard and the UMG to be turned off.

Thanks

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e968b8e0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e968b8e0](https://forums.unrealengine.com/u/anonymous_user_e968b8e0)\
**Post date:** [June 7, 2016, 5:37am UTC](https://forums.unrealengine.com/t/esc-key-action-in-umg/359803/2 "2016-06-07T05:37:08Z")

</div>

Hello, this would be one way to do it.

Go to the graph and make an override On Key Down.

 ![93646-help.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/4/d/64dd63627bb8b8bd18644fa58f0f01052e6d0d3d.png)

Should work. Have a nice day.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2c124cb81](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2c124cb81](https://forums.unrealengine.com/u/anonymous_user_2c124cb81)\
**Post date:** [June 7, 2016, 7:34am UTC](https://forums.unrealengine.com/t/esc-key-action-in-umg/359803/3 "2016-06-07T07:34:52Z")

</div>

I have a problem, I got the same blueprint created but nothing is happening. This is how I got them connected.

 ![93672-problemonkeydown.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/4/f/34fe0eb133414d69bd24e316b33d34752b27958c.jpeg)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2c124cb81](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2c124cb81](https://forums.unrealengine.com/u/anonymous_user_2c124cb81)\
**Post date:** [June 7, 2016, 2:13pm UTC](https://forums.unrealengine.com/t/esc-key-action-in-umg/359803/4 "2016-06-07T14:13:05Z")

</div>

I even tried the short tutorial from Rudy on a blank project and I still got no results:

> **[OnKeyDown - Issue if changing InputMode](https://forums.unrealengine.com/questions/379073/onkeydown-issue-if-changing-inputmode.html)**
>
> Hi, If during the event “OnKeyDown”, you are moving from UIInput to GameInput, the current Key pressed is handled even if you set the output to “handled” Steps Create a Widget Add a “KeyDown” Override function For any key pressed call...

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2c124cb81](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2c124cb81](https://forums.unrealengine.com/u/anonymous_user_2c124cb81)\
**Post date:** [June 7, 2016, 2:40pm UTC](https://forums.unrealengine.com/t/esc-key-action-in-umg/359803/5 "2016-06-07T14:40:02Z")

</div>

I’ve found the solution! answer: [UI Widget key events OnKeyDown/OnKeyUp not generated - UI - Epic Developer Community Forums](https://answers.unrealengine.com/questions/409215/ui-widget-key-events-onkeydownonkeyup-not-generate.html)

The problem was that the widget was not focusable by default.  
The short version is that the checkbox “Is Focusable” in the widget should be turned on (user widget \> first item in the hierarchy \> interaction rollout \> is Focusable)

 ![93732-isfocusable.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/b/7/8b7cbedf888fd613f9ea4a55124123b6e3e4ee94.jpeg)
