-api-id | -api-type |
---|---|
T:Windows.UI.Input.Preview.Injection.InjectedInputKeyOptions |
winrt enum |
Specifies the various options, or modifiers, used to simulate input from physical or virtual keyboards through InjectedInputKeyboardInfo.
No keystroke modifier. Default.
The key is an extended key, such as a function key or a key on the numeric keypad.
The key is released.
The key is a Unicode value.
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.
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" />
Here are some downloadable samples demonstrating basic input and input injection: