InjectedInputKeyOptions Enum

Definition

Specifies the various options, or modifiers, used to simulate input from physical or virtual keyboards through InjectedInputKeyboardInfo.

This enumeration supports a bitwise combination of its member values.

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

ExtendedKey 1

The key is an extended key, such as a function key or a key on the numeric keypad.

KeyUp 2

The key is released.

None 0

No keystroke modifier. Default.

ScanCode 8

The OEM, device-dependent identifier for the key on the keyboard.A keyboard generates two scan codes when the user types a key—one when the user presses the key and another when the user releases the key.

Unicode 4

The key is a Unicode value.

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