define mouse button holding function