IKeyboard Methods

Down

Triggers a KEY_DOWN event on the subject under test and waits for the KeyDownDelay.

Syntax:

void Down(
	Keys key
)

Parameter

Description

key

Type: Keys

Value of the key to hold

Press

Triggers a combination of Down(Keys) and Up(Keys) with a wait time set to the global key down delay.

Syntax:

void Down(
	Keys key
)

Parameter

Description

key

Type: Keys

Value of the key to hold

PressWith

Puts all keys defined in keysToHold in the specified sequence in "down" state, triggers a combination of Down(Keys) and Up(Keys) with a wait time set to the global key down delay and then releases the keys in keysToHold.

Syntax:

void PressWith(
	Keys keyToPress,
	params Keys[] keysToHold
)

Parameter

Description

keyToPress

Type: Keys

Single key that should be pressed while the keysToHold are in down state

[keysToHold]

Type: Keys[ ]

Keys that should be hold while the keyToPress is pressed

Type

Simulates text typing by converting a given string to a sequence of KEY_DOWN and KEY_UP events.

Syntax:

void Type(
	string textToType
)

Parameter

Description

textToType

Type: String

The text that should be typed on the subject under test

Up

Triggers a KEY_UP event on the subject under test

Syntax:

void Up(
	Keys key
)

Parameter

Description

key

Type: Keys

Value of the key to release

Last updated