Share via


InjectedInputPenButtons Enum

Definition

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

This enumeration supports a bitwise combination of its member values.

public enum class InjectedInputPenButtons
/// [System.Flags]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 196608)]
enum class InjectedInputPenButtons
[System.Flags]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 196608)]
public enum InjectedInputPenButtons
var value = Windows.UI.Input.Preview.Injection.InjectedInputPenButtons.none
Public Enum InjectedInputPenButtons
Inheritance
InjectedInputPenButtons
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 buttons are pressed. Default.

Barrel 1

The barrel button is pressed.

Inverted 2

The pen is inverted.

Eraser 4

The eraser button is pressed.

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