Keypad Library... Returning a string after user pressed a certain character

You should be able to replace

  key = getChar();

with

key = customKeypad.getKey();

I only used the getChar() function because I do not have a keypad and needed to use Serial.read()