Hi,
I agree with FvM.
But the "slave" needs to read both lines and rows.
If it is for redundancy (safety) reasons:
* both should work exactly identical.
* during start up they should "read" and check for activity
* in case there is activity, they stay in slave mode
* in case there is no activity, the should start "master" mode by driving the rows actively.
In case one stops master mode, the other will detect this and takes over master mode.
*****
In case redundancy is not needed, then it's far easier that one performs the scanning and transmits the results to the other microcontroller via UART.
Klaus