Sub Process_Globals
Private GameViewHelper As GameViewHelper
End sub
Sub AppStart (Form1 As Form, Args() As String
GameViewHelper.AddKeyListener("GVH", MainForm)
End Sub
Sub GVH_KeyPressed (KeyCode As String) As Boolean
Log(KeyCode)
Dim FormJO As JavaObject = MainForm
Dim Scene As JavaObject = FormJO.GetField("scene")
Dim selectedNode As Node
Try
selectedNode = Scene.RunMethod("getFocusOwner",Null)
Log(selectedNode.Tag) ' all node methods available
Catch
Log("no node has focus")
End Try
If KeyCode = "Tab" And selectedNode.Tag = "TextAreaSendText" Then
ButtonSendText.RequestFocus 'insert here where you want the focus to go
Return True 'consume the keypress
End If
Return False 'do not consume the keypress
End Sub