It sounds like creative use of the Keypad library could help here or a resistor ladder on a single analogue pin