IVMKeyboard::TypeKeySequence method
[Windows Virtual PC is no longer available for use as of Windows 8. Instead, use the Hyper-V WMI provider (V2).]
Simulates a comma-delimited list of keys being typed.
Syntax
HRESULT TypeKeySequence(
[in] BSTR keySequence
);
Parameters
-
keySequence [in]
-
The comma-delimited sequence of key codes to be typed.
Return value
This method can return one of these values.
Return code/value | Description |
---|---|
|
The operation was successful. |
|
The parameter is NULL. |
|
The specified string is empty, or contains an invalid key code. |
|
An unexpected error has occurred. |
Remarks
A key sequence string is a comma-delimited set of key identifiers which are used to simulate the key press and release sequence of a standard U.S. 101-key AT-style keyboard.
If a key identifier appears in the string without a preceding modifier, a key-pressed code is sent to the virtual machine session, followed immediately by its corresponding key-released code. Key modifiers can be used to change this behavior.
For example, the DOWN modifier will send the key-pressed code for the following key identifier without sending the key-released code. This is useful for simulating Ctrl, Alt, and Shift keys when they are held down while other keys are being sent. To release the key, it must be included in the key string again along with a preceding UP modifier.
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows 7 [desktop apps only] |
Minimum supported server |
None supported |
End of client support |
Windows 7 |
Product |
Windows Virtual PC |
Header |
|
IID |
IID_IVMKeyboard is defined as 00695f2e-c5ad-4d6e-b1ab-336ed121f8c4 |