# How to detect if any key has been pressed down in UMG?

**URL:** <https://forums.unrealengine.com/t/how-to-detect-if-any-key-has-been-pressed-down-in-umg/305885>\
**Category:** UI\
**Tags:** how-do-i, unreal-engine, editor, question, Blueprint, UMG\
**Created:** [February 3, 2015, 8:02pm UTC](https://forums.unrealengine.com/t/how-to-detect-if-any-key-has-been-pressed-down-in-umg/305885 "2015-02-03T20:02:04Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Humberto](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/humberto/32/778540_2.png) [@Humberto](https://forums.unrealengine.com/u/Humberto)\
**Post date:** [February 3, 2015, 8:02pm UTC](https://forums.unrealengine.com/t/how-to-detect-if-any-key-has-been-pressed-down-in-umg/305885/1 "2015-02-03T20:02:04Z")

</div>

Hello Everyone,

How do I put an action that is triggered when any key Has Been pressed down on umg?

---

<div class="post-metadata">

**Author:** ![Justin.Dooley](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/justin.dooley/32/1194553_2.png) [@Justin.Dooley](https://forums.unrealengine.com/u/Justin.Dooley)\
**Post date:** [February 3, 2015, 8:09pm UTC](https://forums.unrealengine.com/t/how-to-detect-if-any-key-has-been-pressed-down-in-umg/305885/2 "2015-02-03T20:09:41Z")

</div>

There is no Event in UMG for key being pressed, your best bet is to set up the event in the player controller and forward it to UMG.

If you want to set up your own event in UMG, there is a node you can use to check if the key is pressed at that point in time. Get Owning Player \> Is Input Key Down.

Hope this helps 🙂

---

<div class="post-metadata">

**Author:** ![Humberto](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/humberto/32/778540_2.png) [@Humberto](https://forums.unrealengine.com/u/Humberto)\
**Post date:** [February 3, 2015, 8:13pm UTC](https://forums.unrealengine.com/t/how-to-detect-if-any-key-has-been-pressed-down-in-umg/305885/3 "2015-02-03T20:13:53Z")

</div>

thx mate ç.ç

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_2f116e5b](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_2f116e5b](https://forums.unrealengine.com/u/anonymous_user_2f116e5b)\
**Post date:** [September 8, 2015, 4:55am UTC](https://forums.unrealengine.com/t/how-to-detect-if-any-key-has-been-pressed-down-in-umg/305885/4 "2015-09-08T04:55:23Z")

</div>

Thanks , this info helped me a lot 🙂

---

<div class="post-metadata">

**Author:** ![Doublezer0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Doublezer0](https://forums.unrealengine.com/u/Doublezer0)\
**Post date:** [September 10, 2015, 10:34am UTC](https://forums.unrealengine.com/t/how-to-detect-if-any-key-has-been-pressed-down-in-umg/305885/5 "2015-09-10T10:34:49Z")

</div>

You can over-ride the “On Key Down” function in a UMG blueprint by going to graph mode and selecting from the over-ride functions list.

---

<div class="post-metadata">

**Author:** ![plojnitza](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@plojnitza](https://forums.unrealengine.com/u/plojnitza)\
**Post date:** [June 21, 2016, 2:39pm UTC](https://forums.unrealengine.com/t/how-to-detect-if-any-key-has-been-pressed-down-in-umg/305885/6 "2016-06-21T14:39:18Z")

</div>

You need to have keyboard focus on the widget, not always ideal

---

<div class="post-metadata">

**Author:** ![plojnitza](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@plojnitza](https://forums.unrealengine.com/u/plojnitza)\
**Post date:** [June 21, 2016, 2:39pm UTC](https://forums.unrealengine.com/t/how-to-detect-if-any-key-has-been-pressed-down-in-umg/305885/7 "2016-06-21T14:39:42Z")

</div>

I gave an answer to a similar question

> **[UMG - Keyboard shortcuts](https://forums.unrealengine.com/questions/142832/umg-keyboard-shortcuts.html)**
>
> Hello, So i have my UMG HUD working very well, i had no problem to set it up, i think the umg guys did a great job so far. My issue is that it works well with the mouse but i have some issues with the keyboard. I would like to call a button...

---

<div class="post-metadata">

**Author:** ![phil123456](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@phil123456](https://forums.unrealengine.com/u/phil123456)\
**Post date:** [March 16, 2022, 3:21pm UTC](https://forums.unrealengine.com/t/how-to-detect-if-any-key-has-been-pressed-down-in-umg/305885/8 "2022-03-16T15:21:01Z")

</div>

incorrect  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/7/c/d7c77259db180c3edef2701c21a2e714dfe7899d.png)
