Click or drag to resize
Ranorex

KeyboardPress Method (Keys, Int32, Duration, Int32, Boolean)

Presses and releases the specified key for the specified number of times.

Namespace:  Ranorex
Assembly:  Ranorex.Core (in Ranorex.Core.dll) Version: 12.7.4-git.38314c06
Syntax
public static void Press(
	Keys key,
	int scanCode,
	Duration keyPressTime,
	int times,
	bool setModifiers
)

Parameters

key
Type: System.Windows.FormsKeys
The key.
scanCode
Type: SystemInt32
The hardware scan code for the key. Specify DefaultScanCode to use the default scan code for the specified virtual key.
keyPressTime
Type: RanorexDuration
The time between pressing and releasing the key.
times
Type: SystemInt32
The number of times to press the key.
setModifiers
Type: SystemBoolean
A value specifying whether to set the modifiers specified in the key.
See Also