# GH_MouseTracker class

Namespace: [Grasshopper.GUI](https://developer.rhino3d.com/api/gh1/namespace/grasshopper.gui.md) · Assembly: [Grasshopper](https://developer.rhino3d.com/api/gh1/assembly/grasshopper.md)

```cs
public class GH_MouseTracker
```

Record mouse-movements over time.

## Constructors

- [GH_MouseTracker](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-mousetracker/ctor.md): (3 overloads) Create a new mouse tracker.

## Properties

- [Duration](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-mousetracker/duration.md): Gets the timespan that has passed between the oldest and youngest recorded frames. This is not the same as the time that has passed since recording began.
- [FrameCount](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-mousetracker/framecount.md): Gets the number of recorded frames.
- [MaximumDuration](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-mousetracker/maximumduration.md): Gets or sets the maximum allowed duration of the entire record. When new frames are recorded, old frames that are more distant than MaximumDuration will be dropped. The default duration is 10 seconds.
- [MaximumFrameCount](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-mousetracker/maximumframecount.md): Gets or sets the maximum number of frames to keep in history. If more frames are added, the oldest ones will be dropped. The default is 16,384 frames.
- [NewestFrame](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-mousetracker/newestframe.md): Gets the most recent frame in recorded history.
- [OldestFrame](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-mousetracker/oldestframe.md): Gets the oldest frame in recorded history.
- [TemporalAccuracy](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-mousetracker/temporalaccuracy.md): Gets or sets the maximum temporal accuracy. Frames that are closer together than the accuracy will not be recorded. The default accuracy equals 5ms.

## Indexers

- [Frame](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-mousetracker/item.md): Gets the position (in control coordinates) of the frame at the given index.

## Methods

- [Deviation](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-mousetracker/deviation.md): (2 overloads) Gets the maximum deviation of the recorded mouse path. The maximum deviation is the furthest distance the mouse has been from the first point in the history record.
- [DropFrames](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-mousetracker/dropframes.md): (3 overloads) Drop all frames older than a given limit.
- [LastFrameWithinDeviation](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-mousetracker/lastframewithindeviation.md): Starting from the youngest frame, finds the oldest frame that is still within a maximum deviation of the youngest frame.
- [Record](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-mousetracker/record.md): (2 overloads) Record a new mouse event frame. If this frame is closer than [Accuracy]ms to the previously recorded frame, it is not included.
- [ToString](https://developer.rhino3d.com/api/gh1/type/grasshopper.gui.gh-mousetracker/tostring.md)
