# Print screen of which key is pressed

**URL:** <https://forums.unrealengine.com/t/print-screen-of-which-key-is-pressed/373124>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [October 12, 2016, 12:02pm UTC](https://forums.unrealengine.com/t/print-screen-of-which-key-is-pressed/373124 "2016-10-12T12:02:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zi3i](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zi3i](https://forums.unrealengine.com/u/Zi3i)\
**Post date:** [October 12, 2016, 12:02pm UTC](https://forums.unrealengine.com/t/print-screen-of-which-key-is-pressed/373124/1 "2016-10-12T12:02:10Z")

</div>

Hello. I have a little problem) How can i get pressed key on keyboard and print it on screen?) My solution don’t work) thx.

I create func and get key from key event variable and return value Text. After print text and press any key every tick i have a None value. Help pls.)

 ![110513-1.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/9/0/09010a5342c48ca1ff81ec4e66e2eb6f2f084e04.png)

![110514-2.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/b/4/8b4224af3b77c44a5f6d815c886354802777bea8.png)

 ![110515-3.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/0/4/b04cfddb866ef94d9cb48451d6d29731f8766230.png)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e93164e4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e93164e4](https://forums.unrealengine.com/u/anonymous_user_e93164e4)\
**Post date:** [October 12, 2016, 12:22pm UTC](https://forums.unrealengine.com/t/print-screen-of-which-key-is-pressed/373124/2 "2016-10-12T12:22:31Z")

</div>

To realize this I use a Widget Blueprint. You add the widget to the viewport and in the widget blueprint on the top of the function tab you can override the on key pressed function and in this function you can then print the key on the screen by using the key event. But what you did in your screenshot is that you just pass a empty key event to the function that cant work!

---

<div class="post-metadata">

**Author:** ![Zi3i](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Zi3i](https://forums.unrealengine.com/u/Zi3i)\
**Post date:** [October 12, 2016, 12:37pm UTC](https://forums.unrealengine.com/t/print-screen-of-which-key-is-pressed/373124/3 "2016-10-12T12:37:22Z")

</div>

Can you post a screenshot example how you do this?) thx)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e729f54e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e729f54e](https://forums.unrealengine.com/u/anonymous_user_e729f54e)\
**Post date:** [October 12, 2016, 2:54pm UTC](https://forums.unrealengine.com/t/print-screen-of-which-key-is-pressed/373124/4 "2016-10-12T14:54:29Z")

</div>

Hello Zi3i,

I saw your thread and thought I would give a quick suggestion. If you would like to get the name of the current key being pressed, you could try using the Any key event node and print that out. I have provided an example below. I hope this information helps.

Example:

 ![110541-getkeypressedhelpanykey.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/6/6/366bb6e71dc7bd37c22d6fde43ffb47717d08548.png)

Make it great day
