Uno interfacing to system with scanned keypad

Thanks for the reply- however I'm not sure I explained very well what I am trying to do - I am not trying to use the Arduino to READ the keypad, but instead to interact with the row and column scan lines on an existing independent microprocessor system in such a way that it is able to generate keypresses. Therefore the 'Keypad' library will not be useful in this actual instance.

The idea is that the Arduino monitors the keypad row output scan lines of the existing system and manipulates the existing system keypad input column lines with correct timing in such a way that the existing system thinks that a physical key has been pressed. In order to make the existing system think a key has been pressed, the Arduino must take the corresponding column input line on the existing system low when the appropriate row output line goes low.

The psuedocode to generate one character keypress would be something like:

-Establish which keypad key needs to be pressed next.
-Obtain the row line number (r) and and column line number (c) corresponding to that key from a look up table
-monitor keypad row line (r) until it goes low
-pull column (c) line low
-wait until the row line (r) goes high
-release the column line (c), allowing it to be pulled high by its pullup resistor

The output from the arduino to the keypad column lines has to be (or to seem like it is) an open collector driver so that it does not prevent normal operation of the keypad. I don't have a diagram handy - I'll try to knock up a little sketch to illustrate the principle.