adapt all the state machine to use setTimeOut. Now supported gestures includes tap, double tap and hold.