I really can't see your problem... if you have P1 (0 through 3) supplying 0v in turn to the keypad rows with internal pullups on P2, when you read P2 this gives you which key is on or off in that column.
P1.0=0, P1.1=1,P1.2=1, P1.3=1
Read P2 (provides column A result)
P1.0=1, P1.1=0,P1.2=1, P1.3=1
Read P2 (provides column B result)
P1.0=1, P1.1=1,P1.2=0, P1.3=1
Read P2 (provides column C result)
P1.0=1, P1.1=1,P1.2=1, P1.3=0
Read P2 (provides column D result)
They won't clash atall.. If in the picture Row B is 0v only those keys are affected
if 1 AND 4 are pressed P2 will read 9 denoting two keys are pressed.
Similarly, If row A is 0v and 1 is pressed AND row C is 5v and 1 s pressed, P2 will read 1 on the A scan and then 1 when the C row is scanned.