Players key inputs disabled when widget buttons are in focus

I have some buttons in the screen and I want to keep track of key pressed
(like UP,DOWN keys, etc)…so when no buttons are in focus I can detect
players key presses but when some button is in focus I can navigate with those
keys but are not catched anymore until nothing is focused again.

How can I have both at same time? key navigation and key press events?
Thanks!

Dany

So, you want to use the same buttons to navigate the widget that you do when playing the game? I’m not sure, but I think that is what you are asking?

Yes…when I navigate buttons with the arrow keys I want to get the events too to make things happens at same time

Just want to know when I press the UP key even when buttons are in focus because once you have focused butons and use keyboard for navigate buttos you miss that.

image

this event only works when not buttons in focus…once you are changing buttons with the arrows that event stops working.

Everynone showed me how to add events to button navigation but this is different. I want to keep getting the UP event working or somehow know UP was pressed.

It sounds like you need to set the input mode to Game and UI and make sure all your inputs are set to not consume input.
-You can go to the details panel of the input and uncheck consume input or alternately, I believe the new input system has the option inside the Input Actions assets

That should make everything tied to that input fire altogether.

I already unchecked consume input but navigation swallows every arrows inputs lol. Only works for non navigation keys (╥﹏╥)

Well, drat. That would have been the “simple” solution if it had worked.

I don’t have time to help figure out something this complex right now, but now that we have bumped your thread maybe someone else out there can come help you.

1 Like

Thanks man!! I solved what I wanted to do with a workaround but I still wonder why the engine stops triggering the key events when navigation keys is engaged.

Hope someone figures it out.
Cheers!

Dany

1 Like

It’s a known bug actually!
The bottom face button (“A” on an xbox joypad) is deactivated whenever a widget button is in focus.
How this bug is still not fixed is beyond me.
It’s not like navigating a game menu is a particularly special case…

The best workaround is using the widget’s Button-Pressed / Button-Released event instead of going through the EnhancedInputAction system.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.