Some of my online demos use this method, such as emotional Stroop for mobile.
The key is to record the mouse position and only count a response when it has changed.