# Timeline modal operator: how to get frame cursor to follow mouse

I'm trying to write a modal operator for the timeline, but I'm confused about how to get the current frame cursor in the timeline to follow a 'mousemove' event (and consequently, how to set the new current frame when the operator finishes).

self._initial_mouse = event.mouse_x

self.offset = (self._initial_mouse - event.mouse_x) * -0.1