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

# IGameInputDevice::GetMouseInfo

> Retrieves the mouse properties of the device, such as its supported buttons, sample rate, and scroll wheels.

Retrieves the mouse properties of the device, such as its supported buttons, sample rate, and scroll wheels.

## Syntax

```cpp theme={null}
bool GetMouseInfo(
    GameInputMouseInfo* info
);
```

### Parameters

*info*   \_Out\_\
Type: [GameInputMouseInfo](https://docs.xbox.com/reference/input/gameinput/structs/gameinputmouseinfo.md)\*

Pointer to a `GameInputMouseInfo` structure that receives the mouse properties of the device. If the device doesn't support mouse input, every member of the structure is set to zero.

### Return value

Type: bool

`true` if the device supports mouse input and *info* was filled in; otherwise, `false`.

## Remarks

The `GetMouseInfo` method copies the mouse properties of the device into the caller-provided structure. A device supports mouse input when the value returned by [GetSupportedInput](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getsupportedinput.md) includes `GameInputKindMouse`. If the device doesn't support mouse input, `GetMouseInfo` zero-initializes *info* and returns `false`.

The `supportedButtons` member reports which [GameInputMouseButtons](https://docs.xbox.com/reference/input/gameinput/enums/gameinputmousebuttons.md) the mouse has, and the `hasWheelX` and `hasWheelY` members report whether the mouse has horizontal and vertical scroll wheels. Mouse state is read from readings by using [IGameInputReading::GetMouseState](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getmousestate.md).

The properties returned by this method are fixed for the lifetime of the device, so you can query them once (for example, when the device connects) and cache the result.

The following example shows how to query the mouse properties of a device.

```cpp theme={null}
GameInputMouseInfo info;
if (device->GetMouseInfo(&info))
{
    if (info.hasWheelY)
    {
        // Enable scroll-wheel controls.
    }
}
```

In GameInput v3 and earlier, this information was available from the `mouseInfo` member of the [GameInputDeviceInfo](https://docs.xbox.com/reference/input/gameinput/deprecated/structs/gameinputdeviceinfo.md) structure returned by [IGameInputDevice::GetDeviceInfo](https://docs.xbox.com/reference/input/gameinput/deprecated/interfaces/igameinputdevice/methods/igameinputdevice_getdeviceinfo.md).

## Requirements

**Header:** GameInput.h

**Library:** gameinput.lib

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

## See also

[Overview of GameInput](https://docs.xbox.com/build/core-features/common/input/overviews/input-overview.md)\
[GameInputMouseInfo](https://docs.xbox.com/reference/input/gameinput/structs/gameinputmouseinfo.md)\
[GetSupportedInput](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getsupportedinput.md)\
[GameInputKind](https://docs.xbox.com/reference/input/gameinput/enums/gameinputkind.md)\
[GameInputMouseButtons](https://docs.xbox.com/reference/input/gameinput/enums/gameinputmousebuttons.md)\
[IGameInputReading::GetMouseState](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getmousestate.md)\
[IGameInputDevice](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)

## Version History

| Version | Changes |
| - | - |
| **v4** | Introduced. |


## Related topics

- [GameInputMouseInfo](https://docs.xbox.com/reference/input/gameinput/structs/gameinputmouseinfo.md)
- [IGameInputDevice::GetInputReportInfo](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getinputreportinfo.md)
- [IGameInputDevice::GetKeyboardInfo](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getkeyboardinfo.md)
- [IGameInputDevice::GetSensorsInfo](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getsensorsinfo.md)
- [IGameInputDevice::GetGamepadInfo](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getgamepadinfo.md)
