What is the name of the sensor that most inkjet printers use to keep track of the print head's position?
It sounds to me like an optical encoder, which looks something like this:



One side is an infrared emitter (which is why you can't see it--Infrared light is not visible to the naked eye) and the other side is the infrared receiver. The tape has very small stripes on it, through which light cannot pass. When this stripe blocks the IR light from the emitter, the receiver does not see it. When the tape continues to move, the clear portion of the tape eventually passes through. The light is then seen by the IR receiver, and the circuit can tell that the tape has moved.

I would expect the two-lead part to be the emitter and the 4-lead part to be the receiver.