@ScruffR: Hi ! Thanks for helping me on this ! I have another Question regarding this topic.
I wanted to have 3 buttons in deep sleep mode for my device.
1st Button: Wake up the device which can be pressed on demand by users.
2nd Button: Device Set which can be pressed for 1st time by OR when the user will move the device to other wifi location.
3rd Button: reset the Devices
for 1) I have the solution and it is working fine.
for 2) I saw your solution in this link ( Photon won't enter listening mode while connecting to wifi (works using setup button but not using external button) )
for 3) to build a circuit to keep the button state long enough to read it via my code ( you idea above )
I wanted to check what do you think about that before I proceed for 2) and 3).
Thanks,
Satyen