Sensing switch closure that is part of a large switch matrix

I need to sense a multiple switch closures externally to the circuit that is in operation.

One lead is a +5VDC strobe and the other lead is the return, both originating on a CPU. The switch is part of a large switch matrix where the strobes are columns and the returns are rows.

Naturally the sense circuit must not result in a false switch closure nor cause the inability of
the matrix circuit to detect a switch closure.

For some reason I am in a fog on the solution to this problem.

Original image: 0e7370c63235c7e2c5a897d5d1357330547905fc.png

You don’t show enough detail there. It would be helpful to know how many wires are going into the switch matrix and how many switches. Is it a manufactured product that we can look up the model number online? Can you post a photo?

It doesn’t seem to be impossible on first look. It might be difficult or it might be easy.

The requirement is to monitor a select few (maybe 4 max) switch closures of the switch matrix, not all of them.

Each of the switches appear as originally posted in the drawing. There is a diode on the return leg on each switch.

I will post a detailed schematic and a full matrix when I can get them scanned.

You'll have to catch both the row and column (matrix in and out) states, at the right time, i.e. after the start of a strobe pulse. When a key is pressed, its associated bits in row and column have active state, where active can be low or high.

When you monitor the matrix output (maybe row or column), this value will change only when a key is pressed, else all bits remain in inactive state. That's the right time to read the other (matrix input) state, and figure out which key corresponds to the active bits in both state variables.

Distinct digitalRead() for each pin will be way too slow, so that matrix pins should be connected to one or two ports, and can be read from PINx. For a total of 8 lines one port will be sufficient, else the matrix inputs should be connected to one port, and the outputs to another port. Don't forget to connect the Gnd lines, too!