# MouseState class

Namespace: [Grasshopper2.UI.Flex](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.ui.flex.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
public class MouseState
```

Maintains relevant information associated with a single mouse event.

## Constructors

- [MouseState](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.mousestate/ctor.md): (2 overloads) Create a new state.

## Properties

- [Alt](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.mousestate/alt.md): Gets whether the Alt key was down when this state was recorded.
- [Buttons](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.mousestate/buttons.md): Gets the mouse button state.
- [ContentPoint](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.mousestate/contentpoint.md): Gets the mouse location in content coordinates.
- [Control](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.mousestate/control.md): Gets whether the Control key was down when this state was recorded.
- [ControlPoint](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.mousestate/controlpoint.md): Gets the mouse location in control coordinates.
- [Empty](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.mousestate/empty.md): (static) Creates an empty mouse state.
- [IsEmpty](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.mousestate/isempty.md): Gets whether this state contains any relevant data.
- [Shift](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.mousestate/shift.md): Gets whether the Shift key was down when this state was recorded.
- [Tag](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.mousestate/tag.md): Gets or sets the tag data for this state. This field is mutable because objects themselves cannot be guaranteed to be immutable.
- [Time](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.mousestate/time.md): Gets the time (Utc format) at which the state was recorded.

## Methods

- [ContentSpaceDistance](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.mousestate/contentspacedistance.md): Computes the distance between this state and another in content space.
- [ControlSpaceDistance](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.mousestate/controlspacedistance.md): Computes the distance between this state and another in control space.
- [IsTag](https://developer.rhino3d.com/api/gh2/type/grasshopper2.ui.flex.mousestate/istag.md): Tests whether the tag matches a specific object.
