Here i attached the model of menu flow i had the menu flow with 1 press means it goes to 1 st Menu 1.Company name and again '1' pressed means it goes to company address but i wanna to change it 1 pressed means it goes to company address after the enter pressed means it has to goto company address and if i am in company address if Escape keypressed means it goes back to companyname i want logic please help me
Switch case User interface menu helpp-menu-jpg

I want to go to sub menu is it correct way

1.Enter key pressed means it prints
1.ADMIN
2.Operator
3.Setter
In sub menu if '1' pressed it has to go to 1st menu (ADMIN) please help regarding this
if '2' pressed it has to go to 2nd menu (Setter)


Code:

Code:
key  =READ_SWITCHES();        switch(menu)
        {
            
            case mIdle:
            {
                
                        
                switch (key)
                {
                 unsigned char ret ; 
                 case enterkeystore:
                 {
                     lcdClear();
                     lcdMoveCursor(0,0);
                     lcdPrintStr("1.ADMIN");
                     lcdMoveCursor(1,0);
                     lcdPrintStr("2.SETTER");
                     lcdMoveCursor(2,0);
                     lcdPrintStr("3.OPERATOR");
                     delay_s(1);
                     ret =READ_SWITCHES();
                     
                     if(ret == '1')
                     {
                         lcdClear();
                         lcdMoveCursor(1,0);
                         lcdPrintStr("ADMIN");
                         delay_s(1);
                     }

                                         if(ret == '2')
                     {
                         lcdClear();
                         lcdMoveCursor(1,0);
                         lcdPrintStr("SETTER");
                         delay_s(1);
                     }
                    
                 }
                 break;