Help adding an emergency stop button on Matek H743

I’m trying to add an emergency stop button to Matek H743 on one of the servo port. I see you can change a servo port to like S10 to use GPIO by setting Set BTN_ENABLE = 1 and SERVO_X_FUNCTION = -1.
That is where it get confusing. All I want to do a wire a push button switch that has (NC NO C) to it. When I press the button, it will stop the servo motors. Any help would be great.

Thanks

AFAIK the standard way of implementing emergency stop is to kill power supply to the actuators.

I was looking at the following pages below but I’m looking for guidance from someone who might have done it before. I really want hook up a button an emergency kill switch and possible try to get a encoder so I can select different flight modes.

https://ardupilot.org/rover/docs/common-buttons.html#common-buttons

https://ardupilot.org/rover/docs/common-gpios.html