Share via


InjectedInputGamepadInfo Class

Definition

Represents programmatically generated gamepad input.

public ref class InjectedInputGamepadInfo sealed
/// [Windows.Foundation.Metadata.Activatable(327680, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.Activatable(Windows.UI.Input.Preview.Injection.IInjectedInputGamepadInfoFactory, 327680, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 327680)]
class InjectedInputGamepadInfo final
[Windows.Foundation.Metadata.Activatable(327680, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.UI.Input.Preview.Injection.IInjectedInputGamepadInfoFactory), 327680, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 327680)]
public sealed class InjectedInputGamepadInfo
function InjectedInputGamepadInfo(reading)
Public NotInheritable Class InjectedInputGamepadInfo
Inheritance
Object Platform::Object IInspectable InjectedInputGamepadInfo
Attributes

Windows requirements

Device family
Windows 10 Fall Creators Update (introduced in 10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v5.0)

Examples

Here are some downloadable samples demonstrating basic input and input injection:

Remarks

Important

The APIs in this namespace require the inputInjectionBrokered restricted capability.

Using input injection requires the following be added to the Package.appxmanifest:

  • To <Package>
    • xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
    • IgnorableNamespaces="rescap"
  • To <Capabilities>
    • <rescap:Capability Name="inputInjectionBrokered" />

Constructors

InjectedInputGamepadInfo()

Creates a new InjectedInputGamepadInfo object that is used to specify the gamepad input to inject.

InjectedInputGamepadInfo(GamepadReading)

Creates a new InjectedInputGamepadInfo object that is used to specify the gamepad input to inject based on the current state of the gamepad.

Properties

Buttons

Gets or sets the gamepad buttons used for input injection.

LeftThumbstickX

Gets or sets the position of the left stick on the X-axis.

LeftThumbstickY

Gets or sets the position of the left stick on the Y-axis.

LeftTrigger

Gets or sets the position of the left trigger.

RightThumbstickX

Gets or sets the position of the right stick on the X-axis.

RightThumbstickY

Gets or sets the position of the right stick on the Y-axis.

RightTrigger

Gets or sets the position of the right trigger.

Applies to

See also