Arduino Mega 2560 - Keypad 4X4

Hi, i need some help with my project.

In my project in the loop function you can see the time and date. I want that when I'm pressing 'A' I will see the menu (Already wrote the function for the menu - see func1). Then when I see the menu I have two otptions: Press B to feed now and Press C to set time. Right now I want to focus on the 'B' option - What do I need write for pressing A and then B? Please look at - if (pressed == 'A') in the loop.
this is the Arduino program:

#include <DS1302.h>
DS1302 rtc(11, 12, 13); // (CE, I/O, CLK)

#include <LiquidCrystal.h>
LiquidCrystal lcd(8, 9, 4, 5, 6, 7); // (rs, e, d4, d5, d6, d7)

#include <Keypad.h>
char keys[4][4]={
 {'1','2','3','A'},
 {'4','5','6','B'},
 {'7','8','9','C'},
 {'*','0','#','D'}};
byte colPin[4]={38,39,40,41};
byte rowPin[4]={42,43,44,45};
Keypad keypad=Keypad(makeKeymap(keys),rowPin,colPin,4,4);

int enA=22,enB=23,in1=24,in2=25,in3=26,in4=27;

void setup()
{ 
  rtc.halt(false); // Set the clock to run-mode, and disable the write protection
  rtc.writeProtect(false);
  //rtc.setTime(12, 30, 0);     // Set the time 
  //rtc.setDate(15, 5, 2018);   // Set the date  
 
  lcd.begin(16, 2); // Setup LCD to 16x2 characters
  lcd.clear();
  lcd.setCursor(4, 0);
  lcd.print("Welcome!");
  
  pinMode(enA, OUTPUT); //ena
  pinMode(enB, OUTPUT); //enb
  pinMode(in1, OUTPUT); //in1
  pinMode(in2, OUTPUT); //in2
  pinMode(in3, OUTPUT); //in3
  pinMode(in4, OUTPUT); //in4

  digitalWrite(enA, HIGH);
  digitalWrite(enB, HIGH);
  digitalWrite(in1, LOW);
  digitalWrite(in2, HIGH);
  digitalWrite(in3, HIGH);
  digitalWrite(in4, LOW);
  delay(1500);
  digitalWrite(enA, LOW);
  digitalWrite(enB, LOW);
  digitalWrite(in2, LOW);
  digitalWrite(in3, LOW);
}

void loop()
{
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print(rtc.getTimeStr()); //print time
  lcd.print(" Press A");
  lcd.setCursor(0, 1);
  lcd.print(rtc.getDateStr()); //print date
  delay (1000);
  char pressed = keypad.getKey(); //Read the keypad
  if(pressed == 'A')
  {
    
  }  
}

 void func1(void)
{
  lcd.clear();
  lcd.setCursor(0, 0);
  lcd.print("B. Feed Now");
  lcd.setCursor(0, 1);
  lcd.print("C. Set Time");
  return;
}

void feed(void)
{
  lcd.clear();
  lcd.setCursor(3,0);
  lcd.print("Feeding...");
  
  digitalWrite(enA, HIGH); //motor a
  digitalWrite(in1, HIGH);
  digitalWrite(in2, LOW);
  delay(2000); 
  digitalWrite(in1, LOW);
  digitalWrite(in2, HIGH);
  delay(2000);
  digitalWrite(enA, LOW);
  digitalWrite(in2, LOW); 
  
  digitalWrite(enB, HIGH); // motor b
  digitalWrite(in3, LOW);
  digitalWrite(in4, HIGH);
  delay(2000); 
  digitalWrite(in3, HIGH);
  digitalWrite(in4, LOW);
  delay(2000);
  digitalWrite(enB, LOW);
  digitalWrite(in3, LOW);
  return;
}

Please help me, thank you!

You need a simple state machine. So you have to save your current state to variable and check the key presses depending on the value of that state variable. In it's simplest form this is kind of:

if (state == 1) {
  if (key == 'A') {
    // do something
    state = 2;
  }
} else if (state == 2) {
  if (key == 'B') {
    // do anything
    state = 3;
  }
} else if (state == 3) {
  if (key == 'C') {
    state = 1;
  }
}

I hope you got the point.

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;
    } 
   }
  }

Does your code look any similar to my example? I have only if statements that go inside the main loop(). So the ifs are reached in every round the program makes. In your version the while loop is never left because the keypad is never checked.