Avon Member Licensed User Longtime User Apr 27, 2017 #1 I have a tableview populated with the results of a SQLite query. Now I want to allow the user to navigate within the table view by keystrokes which correspond to key values in the query data How can I capture the keystrokes please?
I have a tableview populated with the results of a SQLite query. Now I want to allow the user to navigate within the table view by keystrokes which correspond to key values in the query data How can I capture the keystrokes please?
Erel B4X founder Staff member Licensed User Longtime User Apr 27, 2017 #2 You can use jGameViewHelper library to intercept keys before they are consumed by the views. Upvote 0
Avon Member Licensed User Longtime User Apr 27, 2017 #3 So I add the library jGameViewHelper.jar, create an instance of the GameViewHelper object in Process_Globals, B4X: Private gvh As GameViewHelper Add a key listener to the main form: B4X: MainForm = Form1 gvh.AddKeyListener("GVH", MainForm) Declare a key up handler: B4X: Sub GVH_KeyReleased (KeyCode As String) As Boolean Log (KeyCode) End Sub Simples! Thanks Erel, very nice. Upvote 0
So I add the library jGameViewHelper.jar, create an instance of the GameViewHelper object in Process_Globals, B4X: Private gvh As GameViewHelper Add a key listener to the main form: B4X: MainForm = Form1 gvh.AddKeyListener("GVH", MainForm) Declare a key up handler: B4X: Sub GVH_KeyReleased (KeyCode As String) As Boolean Log (KeyCode) End Sub Simples! Thanks Erel, very nice.