Arduino Mega 2560 - Keypad 4X4

I tried to write this code but after I'm pressing A the lcd stuck on the menu (func1).

  if(pressed == 'A')
  {
   state = 1;
   func1();
   while (state == 1){ 
    if (pressed == 'B'){
      feed();
      state = 2;
      break;
    } 
   }
  }