I'm not an electrician of any sort, so... salt 'n all. I haven't seen a sensor board quite like the ones you have.
Looks like the middle two are x1 & x2, and the outer two (I'm counting the merged 2 pins in the five pin as one common pin) are power and ground.
While it doesn't matter if you get the x1 & x2 flipped, you might have problems with the power & ground flipped. It would help if I knew what type of transistors were used (the two three-pin black stuff). Are there any "BEC" or "ECB" or the like labeling on them? This would identify what the pins do. (B= base, C = collect, E = emitter)
If there aren't any labels, try lighting either of the LEDs with a multimeter. Usually, if power flows on the pin side, that pin is the power. If flows on the resistor side, the pin connected to the pin side is the ground. The other outside pin would be the opposite, of course. Try wiring it that way and see if it works in windows (if the mouse pointer goes the wrong dirrection, swap the two inner pins).
BTW, the five & four boards are exactly the same, except the five pin one has the extra pin wired in common with the pin next to it. (Your diagrams are missing a connection to one the the transistors.) Here's what I drew yesterday, but got stuck on the transistors & LEDs.