class pScreen extends PopupScreen implements KeyListener{
public boolean keyChar(char key, int status, int time) {
         if (key == Characters.ESCAPE)
           close();
       return false;
   }
}
public boolean keyChar(char key,
                       int status,
                       int time)
Invoked when a sequence of zero or more keyDowns generates a character.
Most applications will want to use this function over the others. It will be invoked when a character is generated.
    Parameters:
        key – Character generated, after any effects of the ALT or SHIFT keys and any complex keyboard mappings.
        status – Status of the ALT, SHIFT and CAPS LOCK keys.
        time – Number of milliseconds since the device was turned on.
    Returns:
        True if the event was consumed.

噗,什么也不说了