Pulldowns for keypads and buttons?

I have a simple 4 button keypad. I've been working with this on my little breadboard. I have 4 inputs going to pins 14-17 (A0-A3 in DIO mode.)

Today I blew 2 of the inputs. Nothing special, they just quit working. No "aw crap" action on my part. The others seem to be floating and I get random keypresses. It's been hot and dry, and I'm guessing some static electricity got these.

If I use the Bounce library or the Keypad library, should I have pulldowns on the all the pins? I put some 20K resistors to ground on the pins and it seems to work, but I'm curious. Would this protect against pins just going away? Will the pulldowns interfere with the debouncing or with the matrix keypad code?

If you have a switch/button between a digital input pin and Ground you should have a pull-up resistor on that pin to provide a know state when the switch/button is open. The internal pull-up resistor can be enabled by setting pinMode(pin, INPUT_PULLUP).

If you have a switch/button between a digital input pin and Vcc you should have a pull-down resistor on that pin to provide a know state when the switch/button is open. There is no internal pull-down resistor so if you need a pull-down you have to provide it externally. 10K resistors are good for that.