B4J Question Show keyboard on windows 8.1 tablet pc

Discussion in 'B4J Questions' started by avacondios, Jan 31, 2015.

  1. avacondios

    avacondios Active Member Licensed User

    Hi,
    I am running a desktop b4j application under windows 8.1 with java 7 and I want automatic to display the virtual keyboard when a textfield has a focus.

    help please...
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Try to add this line:
    Code:
    #VirtualMachineArgs: -Dcom.sun.javafx.isEmbedded=true -Dcom.sun.javafx.touch=true
     
  3. avacondios

    avacondios Active Member Licensed User

    Hi Erel,

    I have tried that without any success. Do you have any other idea ?
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Seems like it is not possible (without using JNI to call a Windows API).
     
  5. FranckB

    FranckB Member Licensed User

    Hi all,

    I try this and it seems to work :

    Code:
    #VirtualMachineArgs: -Dcom.sun.javafx.virtualKeyboard=javafx -Dcom.sun.javafx.touch=true

    EDIT : work only when running from B4J. Doesn't work when running directly the jar file. An idea ?
     
    Last edited: Feb 4, 2015
  6. Erel

    Erel Administrator Staff Member Licensed User

    VirtualMachineArgs is only used when you run from the IDE. If you are running your app from the command line then you can add the same arguments:
    Code:
    java -jar <your jar> -Dcom.sun...
    You can also try to set these properties when the program starts with:
    Code:
    SetSystemProperty("com.sun.javafx.virtualKeyboard""javafx")
    SetSystemProperty(
    "com.sun.javafx.touch""touch")
    Whether it will have the same effect depends on the point that JavaFX checks these properties.
     
    FranckB likes this.
  7. FranckB

    FranckB Member Licensed User

    Hi Erel,

    Thanks for your response.

    The 2 solutions doesn't work. :-(
    I 'm still on trying to resolve this pb.

    Regards.
    Franck
     
  8. Erel

    Erel Administrator Staff Member Licensed User

    Running it from the command line must work as this is the same as what happens in the IDE.
    However the -jar <jar file> should be last (unlike the line I previously wrote).
     
  9. FranckB

    FranckB Member Licensed User

    Work great like that !
    Thks a lot...
     
  10. micro

    micro Well-Known Member Licensed User

    Hi to all
    on my raspberry without this directive "
    -Dcom.sun.javafx.virtualKeyboard=javafx -Dcom.sun.javafx.touch=true"
    the virtualkeyboard show always.
    How disable virtualkeyboard show when textfield has focus?
    Thanks
     
  11. Erel

    Erel Administrator Staff Member Licensed User

    Did you install the virtual keyboard software on the RPi?
     
  12. micro

    micro Well-Known Member Licensed User

  13. Erel

    Erel Administrator Staff Member Licensed User

    Add this line to your app and see whether it disables the keyboard:
    Code:
    SetSystemProperty("com.sun.javafx.virtualKeyboard""none")
     
  14. micro

    micro Well-Known Member Licensed User

    No Erel, the virtualkeyboard always show. :(

    It's possible show and hide from code? (Whit Inline java for example)
     
    Last edited: Feb 3, 2016
  15. Erel

    Erel Administrator Staff Member Licensed User

    No. There is no API to control it.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice