Skip to content

Latest commit

 

History

History
54 lines (37 loc) · 2.2 KB

injectedinputkeyoptions.md

File metadata and controls

54 lines (37 loc) · 2.2 KB
-api-id -api-type
T:Windows.UI.Input.Preview.Injection.InjectedInputKeyOptions
winrt enum

InjectedInputKeyOptions

-description

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

-enum-fields

-field None:0

No keystroke modifier. Default.

-field ExtendedKey:1

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

-field KeyUp:2

The key is released.

-field Unicode:4

The key is a Unicode value.

-field 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.

-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" />

-examples

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

-see-also

Simulate user input through input injection