decreasing keypad pins

Maybe there is a way you could use a ring counter for the rows, synchronizing the counter with the Arduino so when you see a change of state on a column, you could determine which row was being activated by the ring counter. Sounds difficult, but maybe doable if you're desperate.