What is the function of switches in optical panel encoders?
Pin2 and pin3 are the two contacts of the push-to-close switch. If you don't want to use that feature you can leave them unconnected. Or you can buy the version without the switch, the numbering explanation suggests that such version exists: