> ## 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.

# GetGamepadButtonMappingInfo

> IGameInputMapper::GetGamepadButtonMapping

## Syntax

```cpp theme={null}
bool GetGamepadButtonMappingInfo(
    GameInputGamepadButtons buttonElement,
    GameInputButtonMapping* mapping
);
```

### Parameters

*buttonElement*   \_In\_\
Type: [GameInputGamepadButtons](https://docs.xbox.com/reference/input/gameinput/enums/gameinputgamepadbuttons.md)

The specific gamepad button whose mapping is being queried.

*mapping*   \_Out\_\
Type: [GameInputButtonMapping](https://docs.xbox.com/reference/input/gameinput/structs/gameinputbuttonmapping.md)

The mapping information of how the button is mapped from the controller axes, buttons or switches.

### Return value

Type: bool

If the mapping was successfully retrieved. This value is false if the device does not support the [GameInputKindGamepad](https://docs.xbox.com/reference/input/gameinput/enums/gameinputkind.md) input kind or if the specified button element is not supported by the device.

## Requirements

**Header:** GameInput.h

**Library:** gameinput.lib

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

## See also

[Input API Overview](https://docs.xbox.com/build/core-features/common/input/overviews/input-overview.md)\

[IGameInputMapper](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputmapper/igameinputmapper.md)

## Version History

| Version | Changes |
| - | - |
| **v3** | Introduced. |


## Related topics

- [IGameInputMapper (Interface contents)](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputmapper/igameinputmapper.md)
- [GameInputGamepadButtons](https://docs.xbox.com/reference/input/gameinput/enums/gameinputgamepadbuttons.md)
- [GetGamepadAxisMappingInfo](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputmapper/methods/igameinputmapper_getgamepadaxismappinginfo.md)
- [GetRacingWheelButtonMappingInfo](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputmapper/methods/igameinputmapper_getracingwheelbuttonmappinginfo.md)
- [GetFlightStickButtonMappingInfo](https://docs.xbox.com/reference/input/gameinput/interfaces/igameinputmapper/methods/igameinputmapper_getflightstickbuttonmappinginfo.md)
