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"

When I press a GUI button with the mouse, key release events stop firing.

I have a project where I'm using arrow keys to rotate a model. I have some buttons on the screen that toggle some things which the user can click at any time since the mouse is always free to move around. When I click a button, then try to press my keyboard keys to rotate the model, the key release events don't fire, causing my model to start spinning freely. Here's what my GUI looks like: alt text I can get the release events to start firing again by clicking anywhere on the screen except on a button.

Product Version: UE 4.8
bugreport.png (621.3 kB)
more ▼

asked Jun 25 '15 at 09:40 PM in Bug Reports

avatar image

427 20 96 123

avatar image Rudy Q ♦♦ STAFF Jun 26 '15 at 03:57 PM

Hello janimationd,

I have a few questions 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 your provide a detailed set of steps to reproduce this issue on our end?

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

  4. Are you setting the input to UI only at any point?

avatar image janimationd Jun 26 '15 at 05:26 PM

So first off I realized it was not generating pressed events, rather than released events.

  1. Yes

  2. Make more than one button in a widget blueprint, put arrow key based key events on something else in the scene, press one of your gui buttons, and then using the arrow keys won't generate "pressed" events for your object in the scene.

  3. Sure: alt text

  4. No

So upon closer examination I realized what is going on. When I press a button on the UI, it goes into a selection mode which makes pressing the arrow keys highlight buttons rather than execute "pressed" events in game (you can see a white border around one of the buttons in the screenshot). I assume this is intended behavior in screens where everything is a button like on a pause menu, but for my application I need the user to be able to interact with the scene and use the buttons in a way that's responsive. Is there some way to disable this behavior on the buttons?

bugreport3.png (1.7 MB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hello janimationd,

If you would like to turn this feature off you can open up the interaction section for the button and uncheck "IsFocusable". I hope that this helps.

alt text

Make it a great day

focushelpspace.png (38.1 kB)
more ▼

answered Jun 29 '15 at 03:14 PM

avatar image

Rudy Q ♦♦ STAFF
47.4k 545 132 524

avatar image janimationd Jun 29 '15 at 06:18 PM

Disabling that option only makes it so the buttons are no longer highlighted, which only means that I can no longer navigate between them with the arrow keys and press enter to activate them. Even when I have the option disabled on all of my buttons, the buttons still gobble up the key press events from my arrow keys.

avatar image Rudy Q ♦♦ STAFF Jun 29 '15 at 06:45 PM

Hello janimationd,

Have you tried using the on key down override within UMG?

alt text

avatar image janimationd Jun 29 '15 at 07:13 PM

I have not tried, I've never used the overrides before. I can do some research into how they work if that's the only way to fix this, but doesn't it seem like unintended functionality if I deselect "Is Focusable" and the button still reroutes focus from the main game window?

avatar image Rudy Q ♦♦ STAFF Jun 30 '15 at 02:20 PM

Hello janimationd,

The reason I made the suggestion above is because I believe that the widget is taking the input focus. By using the widgets on key down override this will allow you to use your inputs even when the widget has focus. You could also play around with setting the input modes to try and achieve your desired result.

Make it a great day

avatar image janimationd Jun 30 '15 at 11:42 PM

As it turns out, the widget itself has a "Supports Keyboard Focus" option, which when disabled solves my problem. Woo!

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

Hi where did you find Supports Keyboard Focus for the widget

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

There appears to be a field of each widget named appropriately in C++ code, https://docs.unrealengine.com/latest/INT/API/Runtime/SlateCore/Widgets/SWidget/SupportsKeyboardFocus/index.html

avatar image emperor_katax Jun 14 '18 at 02:42 PM

So, basically we need to have a C++ component to get this widget (maybe in HUD) and set those functions in it, correct ? @janimationd

(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