'Press Key' BP Node Not Emulating Enter or Backspace Keys

I have a Blueprint VR project that I just ported over to 4.15 because I plan to release it on the marketplace. The project is a VR virtual keyboard that includes a full QWERTY layout, web browser functionality as well as a standard message box that is separate from the web browser for uses like entering high scores, naming an in game character, etc. All of this is done in UMG using Widget Interaction Components (I followed this tutorial to get the whole thing started: Creating Virtual Keyboard Interactions | Unreal Engine Documentation)

The project was originally developed in 4.14 where I had zero issues with the project after I had completed it’s initial prototype. View the video I recorded to see what “zero issues” means: VR Virtual Keyboard (Unreal Engine 4) - YouTube

The issue I am now having is after porting the project to 4.15 it seems that the ‘Press Key’ node I’m using for simulating certain buttons (Enter and Backspace specifically) does not actually send Enter/Return or Backspace keyboard key presses to the web browser widget. The node seems to work for every other type of keyboard key press other than Enter and Backspace which is very confusing. My thought is that Enter and Backspace are not being properly “virtually clicked” if that makes any sense but I doubt that’s the case.

After doing some research I seemed to have stumbled upon a fixed issue from 4.14 that is kind of similar to my issue. I’m not sure if this is related though.

I have also just confirmed that the secondary keys for Enter and Backspace (NumPad Enter and Delete) also don’t work with the web browser widget.

Hello BananaKing932,

I was not able to reproduce your issue on our end. To investigate further, I would need to see your project, which you can privately message me on the forums here:

Thanks!

Just sent you that private message. Hopefully you’ll find something stupidly simple to fix it, lol.

Your issue is a bad reference in your newer project, specifically in your Messagebox widget, To fix it I used get all widgets of class and set it to the keyboard, then got it from the array

Hope this helps!

Unfortunately your suggestion did not fix the issue. I have changed nothing in the project since sending it to you in the private message so there is nothing new that could be causing this. Attached below is a screenshot of me using your suggested fix as well.

Unfortunately your suggestion did not fix the issue. I have changed nothing in the project since sending it to you in the private message so there is nothing new that could be causing this. Attached below is a screenshot of me using your suggested fix as well.

So when I reviewed the changes I had made. You also need to change all the buttons to work off of On Pressed events instead of On Clicked. This should enable the Spacebar, Backspace, and Enter keys to work.

Sadly the buttons are still not working. I switched out the OnClicked events on both the Enter and Backspace buttons with OnPressed and the sames issues are apparent

However I would like to bring up again that the Spacebar has never had issues, just Enter and Backspace.

Sorry to be a bother again… (I’m appreciating the help though!)

The 4.15.1 update did not fix my issue either. The only thing I can think of to help in this is send you a copy of the project that I have been using your potential fixes in to make sure I’m not missing something.

Hello BananaKing932,

sorry for the delay in response, we have logged your issue here:

You can track the report’s status as the issue is reviewed by our development staff. Please be aware that this issue may not be prioritized or fixed soon.

I am having the same issue right now in my project (in 4.16) and I find that Backspace is working in the web browser but Enter still does not.

I noticed that UE-43370 only specifically mentions the Backspace key. Is there an active issue tracking the use of the Enter key?

It looks like this can be fixed for CEF (web browser) with this change in WidgetInteractionComponent.cpp:

CharCode = '\n';

to

CharCode = '\r';

It looks like CEF wants a carriage return (10), rather than a linefeed (13) for “return/enter”.

Hi Lou.Rohan.
Does this change require the Source Code to be rebuilt from Github?
I edited the line in the Epic Gamed standard download of 4.18 (not Github) and it doesnt seem to do anything.

Hi Davis3D, it works if you change it like LouDilbert wrote.
But I had to:

  1. download the source code from GitHub
  2. run Setup.bat
  3. run GenerateProjectFiles.bat
  4. change the line in WidgetInteractionComponent.cpp
  5. recompile Unreal Engine as “Development Editor” and “Win64” in Visual Studio 2017