JavaFX虚拟键盘 [英] JavaFX virtual keyboard
问题描述
有这样的事吗?我用Google搜索了javafx虚拟键盘,但似乎看起来没有任何效果。我看过这篇文章,但没有代码或示例
Is there such a thing? I have googled javafx virtual keyboard, but nothing seems to appear that is valid. I saw this article, but no code or example
http://docs.oracle.com/javase/8/javafx/user-interface-tutorial/embed.htm
有没有人在javafx应用程序中拥有虚拟键盘的经验?当文本场聚焦时,我需要能够显示普通键盘或数字小键盘。
Does anyone have prior experience with a virtual keyboard in a javafx application? I need to be able to show either a normal keyboard or numeric keypad when a textfield is focused.
推荐答案
是的,有这样的作为Oracle Java 8发行版中的JavaFX虚拟键盘的东西,尽管Oracle在JavaFX的嵌入式版本之外没有记录或支持它。
Yes, there is such a thing as JavaFX virtual keyboard in the Oracle Java 8 distribution, though it is not documented or supported by Oracle outside of the embedded version of JavaFX.
但是,虚拟键盘确实附带了Oracle桌面Java 8 JRE,如果你切换一些未记录和不受支持的系统属性,它似乎确实在那里工作。
However, the virtual keyboard does seem to ship with the Oracle desktop Java 8 JRE and it does seem to work there if you toggle some undocumented and unsupported system properties.
尝试:
-
-Dcom.sun.javafx。 isEmbedded = true
-Dcom.sun.javafx.isEmbedded=true
也许
-
-Dcom.sun.javafx.touch = true
-
-Dcom .sun.javafx.virtualKeyboard = javafx
-Dcom.sun.javafx.touch=true
-Dcom.sun.javafx.virtualKeyboard=javafx
互联网上的一些相关粗略信息:
Some related sketchy info on the internet:
- 激活触摸启用JavaFX中的控件
- JavaFX 8嵌入式模式 Oracle JavaFX论坛帖子。
- JavaFX WebView / WebEngine自动为每个文本输入显示屏幕键盘
- Activating touch-enabled controls in JavaFX
- JavaFX 8 Embedded Mode Oracle JavaFX forum post.
- JavaFX WebView / WebEngine show on-screen-keyboard automatically for each text input
那些人在< a href =http://javafxports.org/page/home =nofollow noreferrer> javafxports 可能知道更多,所以你可以尝试询问是否需要更多信息(如果你想要更多信息)他们的设备)。
The guys over at javafxports might know more, so you could try asking there if you want more information (if you are targeting one of their devices).
这篇关于JavaFX虚拟键盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!