Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
Dim Obj As Reflector
Obj.Target = MainForm.RootPane
Obj.AddEventHandler2("RootPaneKeyEvent", "onKeyPressedProperty")
MainForm.Show
MainForm.RootPane.RequestFocus
End Sub
Sub RootPaneKeyEvent_Event(e As Event)
' bit hackish to get the code
Dim theKey As String = e
'Log(e)
Log("key pressed "& theKey.SubString2(theKey.IndexOf(", code = ")+9,theKey.Length-1))
End Sub