Table of Contents

Method SendKeyDown

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

SendKeyDown(Key, ModifierKeys)

Presses a key.

public virtual bool SendKeyDown(Key keyCode, ModifierKeys modifiers = ModifierKeys.None)

Parameters

keyCode Key

Key to operate on.

modifiers ModifierKeys

A combination of key modifier flags to be pressed with the given keycode.

Returns

bool

Remarks

If you are using modifiers then it needs to be paired with an identical SendKeyUp(Key, ModifierKeys) or the modifiers will not be released (Windows and macOS).