How do I wire a touch plate to the controler?

I have an older XCarve that uses the original control box and an old SO2 using an Arduino Mega2560 with a 4-axis port of GRBL. I’m trying to figure out how to wire a touch plate to either or both.

I have 2 styles of touch plate on hand. The standard z-axis touch and a 3-axis corner touch. The gcode for using these is all over the place but what I can’t find is where do I physically hook up the touch plate to the Arduino or gShield?

Does it connect to one of the limit switch inputs? Does it trigger from ground or +5?

Any help would be appreciated and thanks.

My controllers for reference.

I may have found it? According to this it’s pin 7 on the standard and pin A15 on the Mega. Guess the worst that could happen is I crash a bit testing.

// Define probe switch input pin.
#define PROBE_DDR DDRK
#define PROBE_PIN PINK
#define PROBE_PORT PORTK
#define PROBE_BIT 7 // MEGA2560 Analog Pin 15
#define PROBE_MASK (1<<PROBE_BIT)

A5 on standard.
No need to crash. Just check the pin status.