KeyUp Method (Desktop Objects)

Applies to TestComplete 15.65, last modified on July 17, 2024


Use this property to simulate releasing a key specified by its virtual key code.



TestObj A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section
VK [in]    Required    Integer    
Result None

Applies To

The method is applied to the following object:

View Mode

To view this method in the Object Browser panel and in other panels and dialogs, activate the Advanced view mode.


The method has the following parameter:


Specifies the virtual-key code of the key to be pressed. For a list of the available codes, see the Virtual-Key Codes article in the MSDN library. Note that if the Win32API plugin is installed in TestComplete, you can refer to key codes by their names without defining constants in your test.

Result Value



TestComplete cannot send the KeyUpmethod to an application with higher elevated permissions than the ones of TestComplete. To avoid possible problems, run TestComplete as administrator. See the Restrictions section of theĀ Keys Method topic.


To view an example that demonstrates how to use the KeyUp method, see Simulating Keystrokes.

See Also

KeyDown Method (Desktop Objects)
Keys Method

Highlight search results