Matrix Keypad - Optimisation

The other thing you could is this:
(sticking in all your correct names & values, before setup & in setup, etc)

void  loop(){
value = readAnalog(inputpin);

if (value<=25) 
{
delay (30); // for debounce of next press
//do nothing}  // and all the else if's are skipped, no key has been pressed
else if (value>25 or value <=68) {keypressed = 1;} // or the sequencing up/down in the last exchange
else if (value >68 or value <=125) {keypressed = 2;}
// ... down to 16th

switch(keypressed){
case 1:
//
break;
case 2:
// break; 
etc down to 16th

}

make sure to set value = 0 if no key is pressed so that the switch:case is not going to try and work on an old value. Or add value=0 prior to each break statement so it gets cleared after good button press.