Take the first code and replace the loop function of it with the loop function of the second.
Then add the
char customKey = customKeypad.getKey();
And change each
if (digitalRead(A1) == HIGH) {
tone(8, 494, 100); // play tone 59 (B4 = 494 Hz)
with a string of
if (customKey == '*') {
tone(8, 494, 100); // play tone 59 (B4 = 494 Hz)
Where '*' is the character you want to associate with that note.