How to capture ESC key event?

If you are in a form in find mode and press the key ESC you get out of find mode.
I want to do a process in that moment. I don’t find any form event or form commands.
In this case I cannot use the onHide event because the windows doesn’t hide.

The onShowAllRecords command is fired when you cancel findmode by pressing escape.

Paul