Multi-Line Text Box and ENTER key input

Hi,

As I understand Multi-Line TextBox consumes my ENTER key input and just jumps to new line.
I was wondering if there is a way to get the Enter key input also to reflect in my blueprints while I edit the
textbox in-game.

I have set up input UI only/ attached player controller and Textbox as widget to focus.
I use Key Down override and there I also check if ENTER is pressed. No dice since it seems that the textbox consumes the input.
Shift/CTRL/Alt keys all give feedback by failing the check I set in the override.

My question: Is there a way I could Intercept/duplicate Enter key input to go to new line+give me feedback in the blueprints? Or is there another way I could check live if user has created a new line in multi-line text box?

2 Likes

"I found the answer :

Override the OnPreviewKeyDown in the Widget blueprint (HUD for me) it will get the input BEFORE the child so you can do whatever you want with it. If you reply to this event with an Handled eventreply it will not be sent to the children if you reply Unhandled then it will be sent to the children."
:End Quote

Copy+Paste

But the key here is to override OnPreviewKeyDown NOT OnKeyDown override.

1 Like

This is first step.Next step,you should call SetUserFocus from other widget.Otherwise,the cursor is still visibility.