cheerpj-meta icon indicating copy to clipboard operation
cheerpj-meta copied to clipboard

Trigger keyboard for swing text fields on mobile

Open oeway opened this issue 5 years ago • 2 comments

One nice thing about awt is that the text field are implemented as <input> which can trigger the virtual keyboard on touchscreen devices. Wondering if it's possible to do the same for swing text fields.

oeway avatar Oct 14 '20 16:10 oeway

FYI: It seems the swing text field on Android device can trigger the virtual keyboard.

oeway avatar Oct 25 '20 16:10 oeway

Didn't work for me. I have Swing text fields, but they don't trigger the soft keyboard. You can try on a tablet. I tried with an Apple iPad and a HUAWEI tablet:

Screenshot from HUAWEI tablet: no_soft_keyboard_small http://www.jekejeke.ch/example04/page.html

On a side note, CheerpJ seems to work fine with Chrome, Safari on Android and IOs devices. But didn't see a virtual keyboard triggered. As an extrem solution was thinking of porting the JavaFX keyboard:

JavaFX virtual keyboard https://stackoverflow.com/questions/26768523/javafx-virtual-keyboard

But this has the drawback that it wouldn't make good use of Android respectively IOs resources. Interestingly CheerpJ touch support is quite good, for example in the above example

one can move table columns around by touch. Woa!

ghost avatar Nov 02 '20 10:11 ghost