This problem is that you are using KeyEvent.ANY for EventHandler , it will fire twice, you may add EventType testing or change it to KeyEvent.KEY_PRESSED .
Dim r As Reflector
r.Target = DrawPane
r.AddEventHandler("keypressed", "javafx.scene.input.KeyEvent.KEY_PRESSED")
...
Sub KeyPressed_Event (e As Event)
Dim jo As JavaObject = e
Dim keycode As String = jo.RunMethod("getCode", Null)
Log(keycode)
End Sub
Well...
not working ...because... at your code not setting innernode width and height...
- Yes i don't want to scroll with keys...
- But i want to scroll with vertical horizontal scroll bar...
so when putting:
DrawPane.InnerNode.PrefHeight = 1080
DrawPane.InnerNode.PrefWidth = 1920
the arrow keys moving the drawpane...
So the solution not works with javaobject and not with reflection too.. (is the same)
but wait a minute.... thinking something...