Added mouse button threshold and velocity support