Without a schematic of how the keypad is connected I don't know how we would be able to help you. If you are using an lcd keypad shield with lcd and keypad integrated then you are supposed to state that in your first post along with a schematic or link to the vendor site where you bought it so we can look up the schematic.