This instructable explains how to interface a 4×4 keypad over an I2C bus. I2C is a 2 wire bidirectional bus to which addressable devices can be connected. This will help to interface a keypad using only a few IO pins. It uses I2C remote I/O expander chips, a 4×4 keypad and a 7 segment display as output device.
How to interface I2C keypad - [Link]