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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

4.9 Bug: Button blocks cursor keys

I'm using the cursor keys to move my character around (just like WASD does). If I have a button in my HUD and click on this Button, cursor keys seem to be hard coded to navigate into the UI. So pressing e.g 'Left' in this situation does not move my character anymore. To be able to move again, I've to click into the game window again.
I already tried to disable focus on buttons and tried all values in the 'Navigation' tab of the button (in Designer) for Left/Right/Up/Down/Next/Previous.

Is it possible to get around that hard coded functionality? Thank you.

Product Version: UE 4.9
Tags:
more ▼

asked Sep 13 '15 at 02:00 PM in Bug Reports

avatar image

DerChris
61 5 9 15

avatar image Rudy Q ♦♦ STAFF Sep 14 '15 at 05:56 PM

Hello DerChris,

I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

  1. Can you reproduce this issue in a clean project?

  2. If so, could you provide a detailed list of steps to reproduce this issue on our end?

  3. Could you provide screen shots of any blueprints that may be involved with this issue?

avatar image DerChris Sep 15 '15 at 07:20 PM

Hello Rudy,

thanks for helping. Steps to reproduce:

  1. Create a new FirstPerson C++ project.

  2. Besides WASD, set the cursor keys as motion input for your character in the project settings

  3. Subclass C++ class 'MyUserWidget' from UUserWidget

  4. Subclass blueprint 'BP_MyUserWidget' from 'MyUserWidget'

  5. add 2 Buttons to 'BP_MyUserWidget' in the designer tab

  6. compile and start play

  7. click on one of the buttons

  8. notice that you cannot walk anymore using the cursor keys, but WASD still works. This is the bug. It should still be possible to use the cursor keys to move the character.

avatar image Rudy Q ♦♦ STAFF Sep 15 '15 at 08:20 PM

Hello DerChris,

After reading over your steps provided this appears to be working as intended. The button is supposed to capture the mouse input. If you would like to make it so that you mouse does not interact with a widget you could use the visibility setting "Self Hit invisible" I hope that this information helps.

Make it a great day

avatar image DerChris Sep 17 '15 at 09:18 AM

Hello Rudy,

this is not about mouse input. This is about keyboard input from the cursor keys.

Cursor keys:

Usually located here:

alt text

capture.jpg (10.5 kB)
keyboard.jpg (16.4 kB)
avatar image Rudy Q ♦♦ STAFF Sep 17 '15 at 01:19 PM

Hello DerChris,

Thanks for the clarification, I was able to reproduce this issue on our end. I have written up a report (UE-21174) and I have submitted it to the developers for further consideration. I will provide updates with any pertinent information as it becomes available. Thank you for your information and time.

Make it a great day

avatar image DerChris Sep 17 '15 at 02:02 PM

Thank you very much!

avatar image DerChris Sep 17 '15 at 03:58 PM

Already mentioned in my question that I tried that already. I did that by unchecking this in the designer: Details for the Button

This didn't help. Is there some UMG function ala UnFocusUI() or something that I can call after each button-click? Perhaps that would help.

capture.jpg (13.7 kB)
avatar image Nick Darnell ♦♦ STAFF Sep 21 '15 at 02:06 PM

SetFocusToGameViewport will put focus back on the viewport widget. If it's not the buttons, you probably have another widget higher up that's becoming focused, user widgets can also be made focusable. You could enable always showing the focus rectangle in your user interface project settings to see which widget has the focus. I believe the widget reflector also has this capability.

avatar image DerChris Sep 23 '15 at 10:34 AM

Thanks for helping, Nick. Your idea with the focus rectangle helped me to experiment.

I now think the problem is the viewport widget. If it has focus, player navigation with cursor keys does not work. If no widget (including the viewport widget) has focus, cursor keys work as expected. If viewport widget has focus, clicking once into the game window has the desired effect of 'unfocussing' all widgets (including viewport widget).

2 pics for clarification:

alt text one click later...

alt text

bad.jpg (30.4 kB)
good.jpg (36.7 kB)
avatar image nonder Sep 20 '15 at 12:39 PM

I have absolutly same issue. In my RTS game, when I click on HUD button I can not pan map anymore using arrows. I tested all Input Modes and also my buttons are not Focusable.. it is really annoying for players and there needs to be someway how to disable this functionality.

avatar image GarthHere Nov 29 '16 at 10:23 PM

Yes I have a problem with this when trying to rebind actions to the arrow keys. I have click on screen where there's no buttons first then is will take an arrow key but because the mouse button is binded to shoot I'll get a conflict error before I can rebind to the arrow key.

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

0 answers: sort voted first

Working as intended. If you don't want the UI to consume navigation keys, don't place focus on the UI. Buttons by default are focusable, and will take focus when clicked. So change the button to not be focusable. The arrow keys are navigation keys that shift focus between UI elements, so that keyboard and controller input can be used to navigate the UI.

more ▼

answered Sep 17 '15 at 02:45 PM

avatar image

Nick Darnell ♦♦ STAFF
6k 77 37 151

avatar image GarthHere Nov 29 '16 at 11:03 PM

after doing that I can see its not moving between the buttons but still have to click on the background image to bind an arrow key

avatar image Rudy Q ♦♦ STAFF Nov 30 '16 at 01:42 PM

Hello fallenHere,

I have provided a link to the public tracker. If you visit the link you will see that this issue was closed as "By Design". I hope that this information helps.

Link: https://issues.unrealengine.com/issue/UE-21174

Make it a great day

avatar image GarthHere Nov 30 '16 at 06:00 PM

all I get from that is, I having this problem in 4.11.2, so from 4.9.1 to 4.11.2 no solution for this problem has been found. I just started working on a new project and one of the first things they want me to do is fix the projects key binding, and I'll be having the same problem. I'm gonna try using a popup widget with no buttons to see if that works.

avatar image Rudy Q ♦♦ STAFF Dec 02 '16 at 02:13 PM

I have provided a link to documentation that goes over the nodes used to set input. The nodes such as "Set input game only" will help you manage your inputs. I hope that this information helps.

Link: https://docs.unrealengine.com/latest/INT/Engine/UMG/UserGuide/CreatingWidgets/

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Be the first one to answer this question
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