JavaFX WebView / WebEngine automatically displays an on-screen keyboard for each text input

Background / Context:

I am developing a touch screen kiosk application using JavaFX. The application integrates the browser - WebView. The problem is that all user inputs must be done using the on-screen keyboard (SW-keyboard)

It would be nice to be able to register an event handler in WebView / WebEngine for any HTML text input element or get focus so that I can show / hide the on-screen keyboard.
Despite the fact that I was searching the Internet, I did not find such an opportunity.

My questions:

Does JavaFX / WebView support any support for these cases?

If you would solve this problem, what would be your approach to this?

My decision:

I have a small button (in one corner of the screen) that allows the user to show / hide the on-screen keyboard. Since they must do this manually, it is rather annoying. Especially on sites where it is often viewed (consuming information) and text inputs.

+3
source share
1 answer

It would be nice to be able to register an event handler in WebView / WebEngine for any received / lost focus of HTML text input so that I can show / hide the on-screen keyboard.

Potential strategy for this:

Some parts are likely to be slightly (or completely) flaky, but perhaps other parts may be useful to you.

In the future, if WebView is supported on touchscreen platforms on embedded devices, I assume that out of the box it will work well with a virtual keyboard.

enter image description here

+5
source

Source: https://habr.com/ru/post/1206300/


All Articles