Hello In your code you have enabled pullups resistor to vcc in portb so please change your ports
because "Column bits must have Pull-up resistor attach to VCC"
Ex:
DEFINE KEYPAD_ROW ...