How do you kill the EB process when the user presses the 'X' key to exit?  This is WN and CE version.

I have a customer that want to know how to kill the EB process when the user pressed the 'X' key to exit on WM or CE device?