From: "Mattia Barbon" <mattia.bar...@libero.it> > On 17/03/11 20.34, Octavian Rasnita wrote: > > Hi, > >> I thought that if I define an EVT_CHAR event handler for a form is enough, >> and that event will appear each time a key is pressed, no matter which >> control on that form has the focus: >
> wxKeyEvent does not derive from wxCommandEvent, so it is only sent to > the control generating the event (like wxMouseEvents), hence this is the > expected behavior. > > Regards, > Mattia Ok, thank you. In that case, is there another way of defining an event handler for the entire form that detects when the Escape key is pressed? It seems that Wx::AcceleratorTable works, but at least under Windows it doesn't detect the key combinations that include the Escape key. Thank you. Octavian