Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to get a keyDown event?

Hello everyone!

I've been looking on tutorials on how I could have some sort of an "OnKeyDown" event which gets fired each time I press a key. I want to make a textbox like thing in my game, I have the player controller and I use it inside my HUD to handle mouse input, but I'd like to be able to check for all the keyboard buttons, the WasInputKeyJustPressed function doesn't work for me.

Product Version: Not Selected
more ▼

asked Nov 08 '14 at 11:36 AM in C++ Programming

avatar image

8 2 3 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first


In UMG you acn bind the OnKeyDown event, and then use GetKey to figure out from the FKeyboardEvent what key was pressed.

Full Sample Project

I have given the Community a full sample project in which I capture user input keys for use with my Dynamic Key Rebinding system

I had write several BP Nodes in C++ to get it fully working, but its all part of my victory plugin!

UE4 Forum Link: https://forums.unrealengine.com/showthread.php?51449-Full-Project-Rama-s-UMG-Rebindable-Key-System-Rebind-keys-at-Runtime!&p=176269#post176269


more ▼

answered Nov 08 '14 at 12:01 PM

avatar image

10.6k 446 346 1088

avatar image Chronium Nov 08 '14 at 12:30 PM

With UMG, can I also dynamically display text? Like when using a canvas with AHUD? That would be nice to be able to do.

avatar image Chronium Nov 08 '14 at 05:08 PM

It seems like I wasn't able to do it. And UMG is not nice, blueprint only, it's bad!

avatar image Digital_Kitchen Feb 04 '15 at 02:36 AM

My OnKeyDown or any of the input functions in UMG never get triggered. Is there something I am missing?

avatar image ItsKasper_ Dec 13 '16 at 09:30 AM

I have the same problem. Did you find a solution? Thanks in advance

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question