I have some VGUI panels that receive keyboard input, but I can't figure out how to capture the ESC key. They inherit from vgui::Frame. The problem is when you press ESC, it hides the panel without executing my close code, which causes a crash on HL2 exit and some other problems for me.
Is there a way to capture the ESC button to change the default behavior from hiding the panel to calling the OnCommand("close") method?