Tony,
try using a meter to check the resistance between the 3 wires. Many small units are of the resistive type and are effectively A,B & common and act as switches. To use them ground the common & use the other 2 as A & B, assuming there are pull-up resistors on the inputs.
Tony