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

# GameInputFlightStickButtons

> GameInputFlightStickButtons

# GameInputFlightStickButtons

Enumerates flight stick buttons.

<a id="syntaxSection" />

## Syntax

```cpp theme={null}
enum GameInputFlightStickButtons
{
    GameInputFlightStickNone           = 0x00000000,
    GameInputFlightStickMenu           = 0x00000001,
    GameInputFlightStickView           = 0x00000002,
    GameInputFlightStickFirePrimary    = 0x00000004,
    GameInputFlightStickFireSecondary  = 0x00000008,
    GameInputFlightStickHatSwitchUp    = 0x00000010,
    GameInputFlightStickHatSwitchDown  = 0x00000020,
    GameInputFlightStickHatSwitchLeft  = 0x00000040,
    GameInputFlightStickHatSwitchRight = 0x00000080,
    GameInputFlightStickA              = 0x00000100,
    GameInputFlightStickB              = 0x00000200,
    GameInputFlightStickX              = 0x00000400,
    GameInputFlightStickY              = 0x00000800,
};
```

<a id="constantsSection" />

## Constants

| Constant                           | Description                                                     |
| ---------------------------------- | --------------------------------------------------------------- |
| GameInputFlightStickNone           | Indicates that no button is pressed.                            |
| GameInputFlightStickMenu           | Indicates that the menu button is pressed.                      |
| GameInputFlightStickView           | Indicates that the view button is pressed.                      |
| GameInputFlightStickFirePrimary    | Indicates that the primary fire button is pressed.              |
| GameInputFlightStickFireSecondary  | Indicates that the secondary fire button is pressed.            |
| GameInputFlightStickHatSwitchUp    | Indicates that the top portion of the hat switch is pressed.    |
| GameInputFlightStickHatSwitchDown  | Indicates that the bottom portion of the hat switch is pressed. |
| GameInputFlightStickHatSwitchLeft  | Indicates that the left portion of the hat switch is pressed.   |
| GameInputFlightStickHatSwitchRight | Indicates that the right portion of the hat switch is pressed.  |
| GameInputFlightStickA              | Indicates that the gamepad A button is pressed.                 |
| GameInputFlightStickB              | Indicates that the gamepad B button is pressed.                 |
| GameInputFlightStickX              | Indicates that the gamepad X button is pressed.                 |
| GameInputFlightStickY              | Indicates that the gamepad Y button is pressed.                 |

<a id="remarksSection" />

## Remarks

This enumeration is used in the [GameInputFlightStickState](/reference/input/gameinput/structs/gameinputflightstickstate) structure. You can combine values to read multiple buttons simultaneously.

`GameInputFlightStickHatSwitchUp`, `GameInputFlightStickHatSwitchDown`, `GameInputFlightStickHatSwitchLeft`, and `GameInputFlightStickHatSwitchRight` are hat switch translations to button values. Diagonals are represented by presenting two buttons pressed simultaneously as is the case for the D-pad on a gamepad. Hat switch center is represented by having none of these buttons pressed. These buttons are also the only way to query mapping information for the hat switch using the [IGameInputMapper::GetFlightStickButtonMappingInfo](/reference/input/gameinput/interfaces/igameinputmapper/methods/igameinputmapper_getflightstickbuttonmappinginfo) method.

`GameInputFlightStickA`, `GameInputFlightStickB`, `GameInputFlightStickX`, and `GameInputFlightStickY` are not part of the flight stick mappings. These are instead values copied from the gamepad button report. If there is no gamepad mapped to the device, these values will always be 0.

For more information, see the [Getting data from readings](/build/core-features/common/input/overviews/input-readings#gettingStateSection) section of [GameInput readings](/build/core-features/common/input/overviews/input-readings).

This enumeration can additionally be used with the [IGameInputMapper::GetFlightStickButtonMappingInfo](/reference/input/gameinput/interfaces/igameinputmapper/methods/igameinputmapper_getflightstickbuttonmappinginfo) method to retrieve mapping information for a specific flight stick button.

<a id="requirementsSection" />

## Requirements

**Header:** GameInput.h

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

<a id="seealsoSection" />

## See also

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

## Version History

| Version | Changes                                                                                                                                |
| ------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| **v3**  | **Added 8 constants**: `HatSwitchUp`, `HatSwitchDown`, `HatSwitchLeft`, `HatSwitchRight`, `A`, `B`, `X`, `Y` for gamepad-like buttons. |
| **v0**  | Introduced.                                                                                                                            |

## Appendix: Previous versions

### v0

```cpp theme={null}
enum GameInputFlightStickButtons
{
    GameInputFlightStickNone          = 0x00000000,
    GameInputFlightStickMenu          = 0x00000001,
    GameInputFlightStickView          = 0x00000002,
    GameInputFlightStickFirePrimary   = 0x00000004,
    GameInputFlightStickFireSecondary = 0x00000008,
};
```


## Related topics

- [IGameInputMapper::GetFlightStickButtonMappingInfo](/reference/input/gameinput/interfaces/igameinputmapper/methods/igameinputmapper_getflightstickbuttonmappinginfo.md)
- [GameInputFlightStickState](/reference/input/gameinput/structs/gameinputflightstickstate.md)
- [GameInput](/reference/input/gameinput/gameinput_members.md)
- [GameInputFlightStickInfo](/reference/input/gameinput/structs/gameinputflightstickinfo.md)
- [GameInputFlightStickAxes](/reference/input/gameinput/enums/gameinputflightstickaxes.md)
