Each router is different. AR750 will have script in /etc/rc.button for the switch button function.

For B1300, you need to check the content of /etc/hotplug.d/30-mesh-button to understand how it works first.