I creating widget and I want to process KEY_ESC event key. But when I press KEY_ESC on simulator, widget turn off.
But just have a widget with nesting level where the button does not close the widget, and only goes to the 1 level up.
I had this problem in one of my apps (not widget). The solution was to put a true return to the end of the onKey(evt) function where I process what to do with the keys. Without return true statement it was doing what I want but immediately exiting the app then.
I'm having some trouble understanding the problem you're having, but perhaps this will help... The top-level input delegate for a widget (the one returned from getInitialView()) will not receive some input events. This is by design, as those input events need to be handled by the device to scroll through the widget list and exit the widget list.