Edit the pixhawk hardware safety button function in the code?

The physical arming button for pixhawk, is there a place in the code to edit the function of it?

I want to remove the arming function and instead use it to send a command to “start planned mission” that is saved in the pixhawk memory, of course with a delay.

This is because i want to make and preload a mission and then when the button is pressed i want the drone to execute.