JavaFX virtual keyboard

Is there such a thing? I have a javafx googled virtual keyboard, but nothing seems like it really is. I saw this article but no code or example

http://docs.oracle.com/javase/8/javafx/user-interface-tutorial/embed.htm

Does anyone have experience with a virtual keyboard in a javafx app? When the text box is focused, I need to show a regular keyboard or numeric keypad.

+5
source share
3 answers

Yes, there is such a thing as the JavaFX virtual keyboard in the Oracle Java 8 distribution, although it is not documented or supported by Oracle outside the built-in version of JavaFX.

However, the virtual keyboard seems to come with the Oracle 8 JRE desktop Java platform and seems to work there if you switch some undocumented and unsupported system properties.

Try:

  • -Dcom.sun.javafx.isEmbedded=true

Or maybe

  • -Dcom.sun.javafx.touch=true
  • -Dcom.sun.javafx.virtualKeyboard=javafx

Some related outline information on the Internet:

The guys at javafxports can know more, so you can try asking there if you want more information (if you target one of their devices).

+7
source

if you are confused, here, catch:

1. right-click your project (in Netbeans)

2. Click Properties โ†’ Run โ†’

3. Complete [VM Options] with

  -Dcom.sun.javafx.isEmbedded=true -Dcom.sun.javafx.touch=true -Dcom.sun.javafx.virtualKeyboard=javafx 

4.OK done

+1
source

To be sure, you must add flags.

  • -Dcom.sun.javafx.isEmbedded=true
  • -Dcom.sun.javafx.touch=true
  • -Dcom.sun.javafx.virtualKeyboard=javafx

in javavm and not in the application ... (added as a message, since I can not comment ...)

Is a keyboard setup required? check /com/sun/javafx/scene/control/skin/caspian/fxvk.css in ${JRE/JDK_INSTALL}/jre/lib/ext/jfxrt.jar for css fields affecting the keyboard.

0
source

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


All Articles