https://jxbrowser.support.teamdev.com/support/solutions/articles/9000013075-keyboard-mouse-events提供了一个向swing BrowserView添加键侦听器的示例,但是javafx BrowserView没有相应的键侦听器。是否有其他方法为javafx添加侦听器?
我想你可以用:
view.setOnKeyPressed(event ->{
System.out.println(event.getCode());
});