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

# XFrontPanelGetButtonStates

> XFrontPanelGetButtonStates

Gets the states of the front panel buttons.

## Syntax

```cpp theme={null}
HRESULT XFrontPanelGetButtonStates(  
         XFrontPanelButton* buttons  
)  
```

### Parameters

*buttons*   \_Out\_\
Type: [XFrontPanelButton](https://docs.xbox.com/reference/devkit/xfrontpaneldisplay/enums/xfrontpanelbutton.md)\*

Pointer to a value indicating the current states of the front panel buttons.

### Return value

Type: HRESULT

Returns `S_OK` if successful; otherwise, returns an error code.

## Remarks

The front panel of the XBOX One X dev kit includes five programmable buttons and a directional button that works like a 5-way D-pad.

![Front panel display of the XBOX One X](https://mintcdn.com/microsoft-4404708b/-_0FrcE2bDxzGxv-/images/gdk/reference/front_panel_display_small.png?fit=max\&auto=format\&n=-_0FrcE2bDxzGxv-\&q=85\&s=8c81bf256714cec6526e83a4cbac5538)

The *buttons* parameter points to a [XFrontPanelButton](https://docs.xbox.com/reference/devkit/xfrontpaneldisplay/enums/xfrontpanelbutton.md) object that indicates the state of each button.

For more information, see [XBOX One X: Using the front panel display (NDA topic)](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/console-dev/dev-kits/concepts/scorpio-frontpanel).

## Requirements

**Header:** xfrontpaneldisplay.h

**Library:** xfrontpaneldisplay.lib

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

## See also

[XFrontPanelDisplay](https://docs.xbox.com/reference/devkit/xfrontpaneldisplay/xfrontpaneldisplay_members.md)


## Related topics

- [XFrontPanelButton](https://docs.xbox.com/reference/devkit/xfrontpaneldisplay/enums/xfrontpanelbutton.md)
- [XFrontPanelDisplay (API contents)](https://docs.xbox.com/reference/devkit/xfrontpaneldisplay/xfrontpaneldisplay_members.md)
- [XFrontPanelGetLightStates](https://docs.xbox.com/reference/devkit/xfrontpaneldisplay/functions/xfrontpanelgetlightstates.md)
- [XFrontPanelSetLightStates](https://docs.xbox.com/reference/devkit/xfrontpaneldisplay/functions/xfrontpanelsetlightstates.md)
- [XFrontPanelLight](https://docs.xbox.com/reference/devkit/xfrontpaneldisplay/enums/xfrontpanellight.md)
