x

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 keypress in UI only mode?

So I have a pause menu and right now I can pause it by hitting esc and unpause it by clicking a button. However, I would like to be able to unpause it by hitting the same key. The problem is that you can't get a keypress in UMG. Also, the "was input key just pressed" node doesn't seem to work and I'm assuming that's because it's in UI mode and doesn't listen for the keyboard. What is the workaround for this?

FirstPersonCharacter Blueprint where game gets paused alt text my Pause menu widget blueprint alt text

Product Version: UE 4.10
Tags:
pause.png (171.3 kB)
pauseumg.png (278.7 kB)
more ▼

asked Mar 22 '16 at 08:22 PM in Blueprint Scripting

avatar image

Alex8546
178 10 8 21

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

4 answers: sort voted first

the answer to this is over-riding the OnKeyDown Event function in the UMG widget.

Then you can use the event to detect which key was pressed and perform the action you require. This is because you are using Set Input Mode UI Only. This means the UI will listen for all keypress events.

more ▼

answered Mar 16 '17 at 06:15 PM

avatar image

Doublezer0
77 1 5 9

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

Maybe using Flip-Flop could help? It detect key press and will open menu, then it detect the same key press second time and it will close menu. Then it repeat this loop forever when you press that key.

more ▼

answered Feb 16 '17 at 01:57 AM

avatar image

vodkins
31 1 7 11

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

IMHO the best and light and elegant solution is to check "Execute When Paused" checkbox under Details of Input Key Event Node. Works perfect!

more ▼

answered Mar 16 '17 at 06:37 PM

avatar image

vodkins
31 1 7 11

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

Try this solution, answered in another post... link text

more ▼

answered Jun 06 '18 at 08:47 PM

avatar image

Bonesaw78
36 2 3

(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