Share via


InjectedInputPenParameters Enum

Definition

Specifies the pen states used to simulate pen input through InjectedInputPenInfo.

This enumeration supports a bitwise combination of its member values.

public enum class InjectedInputPenParameters
/// [System.Flags]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 196608)]
enum class InjectedInputPenParameters
[System.Flags]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 196608)]
public enum InjectedInputPenParameters
var value = Windows.UI.Input.Preview.Injection.InjectedInputPenParameters.none
Public Enum InjectedInputPenParameters
Inheritance
InjectedInputPenParameters
Attributes

Windows requirements

Device family
Windows 10 Anniversary Edition (introduced in 10.0.14393.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v3.0)

Fields

Name Value Description
None 0

No pen state reported. Default.

Pressure 1

The pen contact pressure on the digitizer surface, normalized to a range between 0 and 1024. The default is 0 if the device does not report pressure.

Rotation 2

The clockwise rotation, or twist, of the pointer normalized in a range of 0 to 359. The default is 0.

TiltX 4

The angle of tilt of the pointer along the x-axis in a range of -90 to +90, with a positive value indicating a tilt to the right. The default is 0.

TiltY 8

The angle of tilt of the pointer along the y-axis in a range of -90 to +90, with a positive value indicating a tilt toward the user. The default is 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" />

Applies to

See also