I am implementing a confirmation dialog on exit, so capturing the escape key like this: case Ui.KEY_ESC:
var dialog = new Ui.Confirmation("Are you sure you want to exit?");
Ui.pushView(
dialog,
new AppExitConfirmationDelegate(),
Ui.SLIDE_IMMEDIATE...