Keyboard

The Keyboard file holds functions and procedures that are related to the keyboard.


Keyboard.PressKey

procedure TKeyboard.PressKey(Key: Integer);

Presses the given virtual key.

Note: See VK_ constants for values to pass it.


Keyboard.KeyDown

procedure TKeyboard.KeyDown(Key: Integer);

Presses down the given virtual key.

Note: See VK_ constants for values to pass it.


Keyboard.KeyUp

procedure TKeyboard.KeyUp(Key: Integer);

Releases the given virtual key.

Note: See VK_ constants for values to pass it.


Keyboard.IsKeyDown

procedure TKeyboard.IsKeyDown(Key: Integer);

Returns True if the given virtual key is currently down.

Note: See VK_ constants for values to pass it.


Keyboard.Send

procedure TKeyboard.Send(const Text: String; MinKeyWait, MaxKeyWait: Integer); overload;
procedure TKeyboard.Send(const Text: String); overload;
procedure TKeyboard.Send(const Text: String; KeyPressAfter: Integer); overload;

Types the given text to whatever window is currently in focus.

First overload allows you to pass MinKeyWait, MaxKeyWait. Last overload allows you to pass a long a key to be pressed after the text has been typed, for example VK_ENTER.