How the UI only allows mouse input

I want to use only mouse input in UI and keep keyboard input to game.

This is my code and blueprint node.

  • In inventory UI blueprint

If widget on visible set input mode to game and ui and if widget on removed set input mode to game only

IsFocusable is true, mouse cursor visiblility setting is on c++ code.

And this is character movement setting use enhanced input.

The problum is change focus on game and ui.

When i click out of inventory, and then click Inventory again, the character stumbles.

It’s like keyboard input alternating between UI and game, and player movement stumbles.

I checked and found that Velocity was halved.

I think the UI should only accept mouse input or block keyboard input, but I can’t find a way. Please help me

I solved it temporarily.

The problum is Enhanced Input.

I bind input character movement in project setting like Setting Up Character Movement and set IsFocusable is false.

So my character move very well :slight_smile:

I can’t Found yet Why Enhanced Input work weird but it’s work…!
Tell me if anyone finds a reason