you would try like # for mode operation, where in normal operation # is not used, if # key is pressed, you go into another subroutine where multifunction operation can me done, here you can use same pin for multiple purpose operation. and you must activate fault key press system, where you upon pressing # key it goes to certain multipurpose function subroutine, after pressing #, if key is not pressed it has to come out of that multipurpose subroutine with time out.. for each multipurpose operation you have to press #key , for easy coding option.