Share this page

# rdp_key

Emulates pressing a key on an RDP client.

Keyboard Functions

int rdp_key( "StepDescription=<step_description>", "Snapshot=<snapshot>", ["ConnectionID=<connection_identifier>",] ["KeyValue=<key_name>",] ["KeyModifier=< key_modifier >",] RDP_LAST );

This function returns LR_PASS (0) on success or LR_FAIL (1) on failure. Note that LR_PASS and LR_FAIL generally indicate whether the function call completed without an exception, and not that the test step succeeded.

All string arguments (char type) can be parameterized using standard parameterization.

Argument | Description
--- | ---
StepDescription | A descriptive, unique name for this step. Use any text.
Snapshot | The name of the snapshot file of the screen state before this step.
ConnectionID | The name of the connection on which this function operates. Do not change the recorded ID. If several connections are open and the ID is not specified, the first connection in the script is used. If only one connection is open, the connection ID is not required.
KeyModifier | Modifier keys pressed while performing this operation. This argument is optional if the KeyValue argument is present. If more than one modifier key is pressed then these are separated by a comma. For a list, see Modifier Key Values.
KeyValue | The name of the key. The key can be printable or non-printable keys. This argument is optional if the KeyModifier argument is present. For a list, see Key Names
RDP_LAST | The delimiter marking the end of the argument list.

The rdp_key function emulates a user pressing a key on an RDP client.

## Example

The following example shows a key being pressed.

rdp_key("StepDescription=Key Press 2",

"Snapshot=snapshot_8.inf",

"KeyValue=VK_RETURN",

RDP_LAST );

Tips to improve your search results... VuGen Function Reference Version 26.1 Function Reference 26.1 All View Local Help Center View Online Help Center Version: