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

# GetExtraButtonCount

> GetExtraButtonCount

# GetExtraButtonCount

Gets the number of extra buttons, or non-supported buttons, present in the device for a given input kind.

## Syntax

```cpp theme={null}
HRESULT GetExtraButtonCount(
    GameInputKind inputKind,
    uint32_t* extraButtonCount
);
```

### Parameters

*inputKind*   \_In\_\
Type: GameInputKind

The input kind whose extra button count is being requested.

*extraButtonCount*   \_Out\_\
Type: uint32\_t\*

The number of extra buttons, or non-supported buttons, present in the device for the specified input kind.

### Return value

Type: HRESULT

Function result.

## Remarks

Extra buttons are controller buttons that exist on the physical device but are not part of the standard mapping for the specified input kind. This method is useful for applications that want to access device-specific buttons that go beyond the standard input mapping.

The obtained count is expected to be used with the [GetExtraButtonIndexes](/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getextrabuttonindexes) method to retrieve the specific indexes of these extra buttons and to buffer the correct space to store the button indexes provided by that method.

## Requirements

**Header:** GameInput.h

**Library:** gameinput.lib

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

## See also

[GameInputKind](/reference/input/gameinput/enums/gameinputkind)<br />
[GetExtraButtonIndexes](/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getextrabuttonindexes)<br />
[GetExtraAxisCount](/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getextraaxiscount)<br />
[IGameInputDevice](/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice)

## Version History

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


## Related topics

- [GetExtraButtonIndexes](/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getextrabuttonindexes.md)
- [GetExtraAxisCount](/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getextraaxiscount.md)
- [IGameInputDevice](/reference/input/gameinput/interfaces/igameinputdevice/igameinputdevice.md)
- [IGameInputReading::GetControllerButtonCount](/reference/input/gameinput/interfaces/igameinputreading/methods/igameinputreading_getcontrollerbuttoncount.md)
- [GetExtraAxisIndexes](/reference/input/gameinput/interfaces/igameinputdevice/methods/igameinputdevice_getextraaxisindexes.md)
