emulation of mousedown, mousemove, and mouseup