Change Reset button script

Is it possible to change the reset button script so that I can factory reset by pressing the button 3 times rather than holding for X seconds?

You can change the reset button action by modifying /etc/rc.button/reset