JavaFX虚拟键盘 [英] JavaFX virtual keyboard

查看:621
本文介绍了JavaFX虚拟键盘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有这样的事吗?我用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:

  • 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆