Screen screen = ((Screen)o); Item item = screen.getCurrentItem(); if (item instanceof TextField ) {  if (!screen.isMenuOpened() && keyCode != KEY_BB_UP && keyCode != KEY_BB_DOWN && keyCode != KEY_BB_LEFT && keyCode != KEY_BB_RIGHT) {  System.out.println("ignoring key for current textfield."); return true; } }
Screen screen = ((Screen)o); Item item = screen.getCurrentItem(); if (item instanceof TextField ) {  if (!screen.isMenuOpened() && keyCode != KEY_BB_UP && keyCode != KEY_BB_DOWN && keyCode != KEY_BB_LEFT && keyCode != KEY_BB_RIGHT) {  System.out.println("ignoring key for current textfield."); return false; }
        protected boolean keyDown(int keyCode, int status) {                boolean processed = super.keyDown(keyCode, status);                if (processed) {                        return true;                }                //#debug                System.out.println("keyDown: keyCode=" + keyCode + ", key=" + Keypad.key( keyCode) + ", char=" + Keypad.map( keyCode ) );                                Field nativeFocusedItem = super.getFieldWithFocus();                if (nativeFocusedItem instanceof PolishEditField && ((PolishEditField)nativeFocusedItem).processKeyEvents) {                	Object o = this;                     if ( o instanceof Screen ) {                                Screen screen = ((Screen)o);                                Item item = screen.getCurrentItem();                                if (item instanceof TextField ) {                                    //System.out.println("TextField in focus, menu open="  + screen.isMenuOpened() );                                    if (!screen.isMenuOpened()                                        && keyCode != KEY_BB_UP                                        && keyCode != KEY_BB_DOWN                                        && keyCode != KEY_BB_LEFT                                        && keyCode != KEY_BB_RIGHT) {                                    		//#debug                                            System.out.println("ignoring key for current textfield.");                                            return true;                                    }                                }                        }                  }                switch ( Keypad.map( keyCode, status ) ) {                case '0': keyCode = KEY_NUM0; break;                case '1': keyCode = KEY_NUM1; break;                case '2': keyCode = KEY_NUM2; break;                case '3': keyCode = KEY_NUM3; break;                case '4': keyCode = KEY_NUM4; break;                case '5': keyCode = KEY_NUM5; break;                case '6': keyCode = KEY_NUM6; break;                case '7': keyCode = KEY_NUM7; break;                case '8': keyCode = KEY_NUM8; break;                case '9': keyCode = KEY_NUM9; break;                }                keyPressed( keyCode );    			Object o = this;                if ( o instanceof Screen ) {                        return ((Screen)o).keyPressedProcessed;                } else {                         return true;                }         }