Module to detect earphone button click and hold