Connecting a 4*4 keypad

raschemmel:

The first question that comes to mind is: "Do you realize that analog pins can be used as digital pins?"

Reply#5 gave the OP an example of that. It would appear he has not looked at it.

Not really. That example used an analog pin as an analog pin, not as a digital pin.
It is possible to use an analog pin as a digital pin, and if two of them are unused, there's the 8 pins he needs.