Coding an Alarm- need help with code

I didn't check the whole code, and I can't test it because I don't have the hardware.
But you have good indents with good comments and good names for functions and variables. Well done.

You could make a few files. In the upper-right corner of the Arduino IDE (the Arduino software) is a drop down button.
If you place the keypad code in a function in seperate file, it make things easier.
Perhaps you could also create a *.h file and copy the defines into it. That will also make it easier.

Is the keypad function working ?
You can test it in a new test sketch. Send the characters to the serial port, so you can see what is going on.

Detecting the code can be done in so many ways. I see that you use a "state machine". That is good, but it is easy to make a mistake in the code.
Do you put a '*' character on the LCD if a number is pressed ?