Emulate ENTER for Input field

Hi friends,

I'm trying to solve the following situation. I use Enterprise Browser as a client for WMS system. For scanning barcodes I use DataWedge as keystroke output with autoEnter. I have no way to edit server-side code, so I did several customization using DOM injection, e.g. custom sound and vibrations notifications, showing/hiding Enterprise Keyboard on TC8000, remapping hardware buttons on MC33, etc. I also managed to put cursor into Input field when scanning data.

Right now I have another challenge. I need to manipulate scanned barcode before it is send to WMS client. Let's say I scan GS1 Datamatrix, which I need to parse, process some data from this code independently of the WMS, then send only GTIN to the WMS. Everything with just pressing the trigger. I was able to switch DataWedge to Intent output mode, I can catch the intent in EB, I can also parse scanned barcode and put the GTIN into Input field in WMS. I only miss the last step - pressing ENTER in the Input field programatically.

I was looking for some "sendKey" API, similar to buttonBar API, but found nothing. I was also thinking about creating invisible button bar with "ENTER" button and press this button, but I found no API call for this either. I was looking for generic JavaScript code to emulate keypress, but with no luck.

Does anyone have some idea how to achieve this? Basically I need to send ENTER key to the Input field as if I press the key on the keyboard.

Thank you in advance for any help.