> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GameInputMouseState

> GameInputMouseState

# GameInputMouseState

Describes the state of a mouse.

<a id="syntaxSection" />

## Syntax

```cpp theme={null}
struct GameInputMouseState
{
    GameInputMouseButtons   buttons;
    GameInputMousePositions positions;
    int64_t                 positionX;
    int64_t                 positionY;
    int64_t                 absolutePositionX;
    int64_t                 absolutePositionY;
    int64_t                 wheelX;
    int64_t                 wheelY;
};
```

<a id="membersSection" />

### Members

*buttons*<br />
Type: [GameInputMouseButtons](/reference/input/gameinput/enums/gameinputmousebuttons)

State of the mouse buttons.

*positionFlags*<br />
Type: [GameInputMousePosition](/reference/input/gameinput/enums/gameInputmousepositions)

State of the mouse positions.

*positionX*<br />
Type: int64\_t

Cumulative x-axis change in the position of the mouse.

*positionY*<br />
Type: int64\_t

Cumulative y-axis change in the position of the mouse.

*absolutePositionX*<br />
Type: int64\_t

Absolute x-axis position of the mouse.

*absolutePositionY*<br />
Type: int64\_t

Absolute y-axis position of the mouse.

*wheelX*<br />
Type: int64\_t

Cumulative change in the x-axis scroll wheel.

*wheelY*<br />
Type: int64\_t

Cumulative change in the y-axis scroll wheel.

<a id="remarksSection" />

## Remarks

This structure is used by the [IGameInputReading::GetMouseState](/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getmousestate) method.

Mouse and scroll-wheel movements are not reported as absolute positions. Calculate deltas by subtracting the values in the current reading from the values in the previous reading.

GameInput will present any available trackpad devices as a single virtual mouse device.

For more information, see [GameInput readings](/build/core-features/common/input/overviews/input-readings).

<a id="requirementsSection" />

## Requirements

**Header:** GameInput.h

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

<a id="seealsoSection" />

## Conceptual documentation

* [GameInput keyboard and mouse](/build/core-features/common/input/advanced/input-keyboard-mouse)

## See also

[Overview of GameInput](/build/core-features/common/input/overviews/input-overview)\
[GameInput](/reference/input/gameinput/gameinput_members)

## Version History

| Version | Changes                                                                                                     |
| ------- | ----------------------------------------------------------------------------------------------------------- |
| **v1**  | **Added** `positions` (GameInputMousePositions bitmask) and `absolutePositionX`/`absolutePositionY` fields. |
| **v0**  | Introduced.                                                                                                 |

## Appendix: Previous versions

### v0

```cpp theme={null}
struct GameInputMouseState
{
    GameInputMouseButtons buttons;
    int64_t               positionX;
    int64_t               positionY;
    int64_t               wheelX;
    int64_t               wheelY;
};
```


## Related topics

- [IGameInputReading::GetMouseState](/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getmousestate.md)
- [GameInputMousePositions](/reference/input/gameinput/enums/gameInputmousepositions.md)
- [GameInputMouseButtons](/reference/input/gameinput/enums/gameinputmousebuttons.md)
- [GameInput](/reference/input/gameinput/gameinput_members.md)
- [GameInputKeyState](/reference/input/gameinput/structs/gameinputkeystate.md)
