your problem is with the keypad IC(hardware), changed it and will work fine