char customKey = customKeypad.waitForKey();
if (customKey)
{
Serial.print(customKey);
referencePDU[n] = Serial.read();
n += 1;
}
So, if there is something other than zero read from the keypad, read a character from Serial.
Is that what you mean to do ?