I am trying to work around bug <https://xojo.com/issue/17130> (WE: Listbox KeyPressed event does not fire) by adding a page KeyPressed event handler. It’s easy enough to handle up/down and other various key combos in this case, but with other widgets on the screen, the page KeyPressed responds when any widget is active, for example a textbox. If, then, you have your cursor in the TextBox and press the Up arrow key, your cursor does go up, but then the page key event is fired and whatever you have your Up key doing there is performed as well.
I was thinking of checking to see what widget is currently focused, but am failing in that area.
I attempted to implement GotFocus/LostFocus event handlers for all widgets and set a page variable IgnorePageKeyEvent
but some widgets on my page (radio button groups) don’t seem to get focus events, thus the variable is not set for all widgets.
Any thoughts?