digilord,

That's a very dangerous way to try to read the keypad.

Since you start with all columns having a LOW output, then set the column you're looking at HIGH. If the user presses 2 buttons at the same time, it can create a short between the HIGH and LOW outputs. It'll be a Pretty plume of smoke, but it only does it once.

It's better to have Pull-Up resistors on the ROW's, start with all columns set to INPUT, and then set the column you're looking at LOW. Or that can be reversed ... Pull-Down resistors, start with all columns set to INPUT, and then set the column you're looking at HIGH.

The reason you're getting random results, is due to the lack of Pull-Up's. With the switches open, the ROW input's are floating, and could read either high or low at anytime.
<br>