saving pressed keypad into buffer

I would like to ask about how to save the pressed keypad into buffer, I have tried to make it but the result pressed keypad is different with buffer. I pressed number 1 in keypad but buffer is saving number 51, here is my code:

void keypadEvent(KeypadEvent eKey){ switch (keypad.getState()){ case PRESSED: Serial.print("Pressed: "); Serial.println(eKey); buffer_keypad[pndah]=eKey; Serial.println(buffer_keypad[pndah]); pndah++; if (pndah>1) pndah=0;

anybody can help me, please? thanks

are you using the default example ?

please show full code please we can’t help with that snippet
what keypad do you have?

some ideas:

51dec is ASCII character ‘3’ which is on the other side (column) of your ‘1’ character and in the same row for many keypads.

→ look how you defined keypad and it’s mapping
→ look how it is wired.