I have a panel that should receive keyboard events. It works fine on OSX and GTK (Linux).
On Windows, it receives “normal” keyboard events (letter keys, number keys, etc.) If I type an arrow key or tab key, it loses focus and gives focus to a ListCtrl in another panel. If I enter an ENTER key, it does not receive the ENTER keypress (but does not change the focus). This is not the desired behavior – I need to process the arrow keys and enter keys on the panel that initially had the focus.
There may be an event I could trap here to see where these arrow/enter/tab keypresses are going to, but I can’t spot it.
How can I either prevent this grabbing of my keystrokes or intercept it?
Attached is a simple reproduction of the problem. On OSX, when this is run, you can enter “normal” keys or arrow/tab/enter and get console confirmation that the panel’s event got them. On Windows, you can enter “normal” keys and get the same confirmation. Enter keys vanish. Tab/Arrow keys vanish and then the focus magically moves to the listctrl (you can confirm this by arrowing up/down in the list).
Thanks for any help – I’m stumped here.
focus.py (1.15 KB)