Share via


FlightStick Class

Definition

Represents a flight stick.

public ref class FlightStick sealed : IGameControllerBatteryInfo
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 262144)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class FlightStick final : IGameControllerBatteryInfo
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 262144)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class FlightStick : IGameControllerBatteryInfo
Public NotInheritable Class FlightStick
Implements IGameControllerBatteryInfo
Inheritance
Object Platform::Object IInspectable FlightStick
Attributes
Implements

Windows requirements

Device family
Windows 10 Creators Update (introduced in 10.0.15063.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v4.0)

Remarks

FlightStick is targeted at simple, arcade-style flight games. It provides several basic inputs, which are derived from the lowest common denominator of inputs available across the majority of popular flight stick devices. These inputs include:

  • Two buttons for firing primary and secondary weapons.
  • A hat switch for camera view and/or target selection.
  • Axis data for pitch, roll, yaw, and throttle position.

Instances of the FlightStick class cannot be created directly; instead, instances of the class are retrieved through the FlightStick.FlightSticks property listing all connected flight sticks or through the FlightStick.FlightStickAdded event.

See Flight stick for more information about how to use the FlightStick class.

Supported Devices

FlightStick supports any GIP (Gaming Input Protocol) or XUSB flight stick.

Properties

FlightSticks

The list of all connected flight sticks.

HatSwitchKind

The type of hat switch on the flight stick.

Headset

The audio headset attached to the flight stick.

IsWireless

Gets a value that indicates the wireless state of the flight stick.

User

The user associated with the flight stick.

Methods

FromGameController(IGameController)

Returns the given game controller as a flight stick.

GetButtonLabel(FlightStickButtons)

Retrieves the button label for the specified button.

GetCurrentReading()

Gets a snapshot of the flight stick state.

TryGetBatteryReport()

Gets information about the flight stick's current battery state.

Events

FlightStickAdded

Signals when a new flight stick is connected.

FlightStickRemoved

Signals when a flight stick is disconnected.

HeadsetConnected

Signals when a headset is attached to the flight stick.

HeadsetDisconnected

Signals when a headset is disconnected from the flight stick.

UserChanged

Signals when the user associated with the flight stick has changed.

Applies to

See also