Using COM-08653 (12 Button Keypad) as simple buttons on microcontroller

I see...

void loop() {

buttonpoundpressed ();

...

}

buttonpoundpressed () {

while(kpd.getKey() == '#'){
// command to run until this is no longer valid

for(pos; pos < 180; pos += 1) // Begin to rotate pressure washer from rest to full power
        {
         myservo.write(pos);
         delay(10);

}

...
}