How to connect wxEVT_KEY_DOWN?

BlitzMax Modules Forums/Brucey's Modules/How to connect wxEVT_KEY_DOWN?

I think you do need to use ConnectAny - but like you I've had trouble figuring out exactly why. Apparently wxKeyEvents don't propagate from a child window back to a parent window - so if the gadget has keyboard focus (SetFocus) you should in theory just connect it up via ConnectAny without your other gadgets getting confused.

I know it works fine for gadgets that use the keyboard inherently - like a textfield - but am not so sure about plain windows and canvases.

Brucey has played around with this more than me. I think I recall him saying that with a canvas, he had to use an accelerator table. But that's just a vague memory and could easily be wrong. I'm sure he'll be along any day soon...