boolean handled = commandItem.handleKeyPressed( 0, Canvas.FIRE ); if (!handled) { setOpen( false ); }
commandItem.handleKeyPressed( 0, Canvas.FIRE );
	protected boolean handleKeyPressed(int keyCode, int gameAction) {		//#debug		System.out.println("MenuBar: handleKeyPressed(" + keyCode + ", " + gameAction  );		this.isSoftKeyPressed = false;		if (keyCode == LEFT_SOFT_KEY) {			this.isSoftKeyPressed = true;			if (this.isOpened) {				CommandItem commandItem = (CommandItem) this.commandsContainer.getFocusedItem();				//#if tmp.useInvisibleMenuBar					if (commandItem.command == this.cancelCommand ) {						setOpen( false );					}					//TODO find a way how to handle the hide command on BlackBerry when it is invoked directly...				//#endif				boolean handled = commandItem.handleKeyPressed( 0, Canvas.FIRE );				if (!handled) { // CommandItem returns false when it invokes the command listener					setOpen( false );				}								return true;			} else if (this.singleLeftCommand != null) {				this.screen.callCommandListener(this.singleLeftCommand);				return true;			} else if (this.commandsList.size() > 0) {				setOpen( true );				return true;			}		} else if (keyCode == RIGHT_SOFT_KEY) {			this.isSoftKeyPressed = true;			if (this.isOpened) {				setOpen( false );				return true;			} else if (this.singleRightCommand != null) {				this.screen.callCommandListener(this.singleRightCommand);				return true;			}		} else if (this.isOpened){			if (keyCode != 0) {				gameAction = this.screen.getGameAction(keyCode);			}//			if (gameAction == Canvas.FIRE) {//				int focusedIndex = this.commandsContainer.focusedIndex;//				Command command = (Command) this.commandsList.get(focusedIndex);//				setOpen( false );//				this.screen.callCommandListener(command);//				return true;//			}			boolean handled = this.commandsContainer.handleKeyPressed(keyCode, gameAction);			if (handled) {				this.isInitialised = false;			} else { // command item is returning false when a command has been triggered				setOpen( false );			}			return handled;		}		return false;	}