I need some kind of routine that can detect when the user has pressed the escape button.