Can you tell us more about your hardware setup. Possibly a schematic should help. Just with the code it is tough to debug the issue.
i am using a 4*4 keypad ,and connect the rows to P0--P0,the columns to P0--P0;
set the pins as pull down mode,
and the problem is that it seems the P0 and P0 can not get the signal, because other pins works fine