help with keypad using analog input

Hello ,
I have connected to resistors as shown in the image
but I get only half of the keys works

button value
1 - 32
2- 0 (nothing)
3- 0 (nothing)
4- 0 (nothing)
5- 218
6- 77
7- 0 (nothing)
8- 204
9- 48

    • 196
      0 -0 (nothing)

-0 (nothing)

what could be the problem?

this is the code

int Analogvalue=A2;//analog pin for reading
int senseValue=0;

void setup() {
Serial.begin(9600);
delay (400);
Serial.println("Waiting time");
for (int i=0;i<6;i++)
{
  Serial.print ("**");
  delay (1000);
  }
Serial.println("Done!");

}


void loop() {
  
senseValue=analogRead(Analogvalue);
senseValue = map(senseValue, 0, 1023, 0, 255);
Serial.print("     Sensor Value -    ");
 Serial.println(senseValue);
 delay(500);
   }

Thanks ,

Matrix_Keypad(analog).gif

List the resistor values . The schematic you posted has incorrect units. List the value shown for each resistor with the incorrect units and next to it show the correct value and units.

Take a look at this library and follow the keypad diagram. OneWireKeyPad

Good idea.