InjectedInputKeyboardInfo.VirtualKey Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a device-independent identifier mapped to a key on a physical or software keyboard.
public:
property unsigned short VirtualKey { unsigned short get(); void set(unsigned short value); };
uint16_t VirtualKey();
void VirtualKey(uint16_t value);
public ushort VirtualKey { get; set; }
var uInt16 = injectedInputKeyboardInfo.virtualKey;
injectedInputKeyboardInfo.virtualKey = uInt16;
Public Property VirtualKey As UShort
Property Value
The device-independent identifier for the key on the keyboard.
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" />