This form of simple software keyboard doesn't work in your case as you don't have access to the input widget.
You will need one that actually sends keyboard events into the application, for example the Qt Virtual Keyboard or modify the one you have to generate key events and send them to the application's focus object
Cheers,
_
Bookmarks