Keyboard¶
Methods to use the keyboard.
TKeyboard¶
Main record responsible with handling Keyboard input.
Keyboard.Setup¶
procedure TKeyboard.Setup();
Sets up internal TKeyboard values.
This is automatically called for you on the Keyboard variable.
Keyboard.KeyDown¶
procedure TKeyboard.KeyDown(key: EKeyCode);
Presses down the given virtual key.
Keyboard.KeyUp¶
procedure TKeyboard.KeyUp(key: EKeyCode);
Releases the given virtual key.
Keyboard.KeyPress¶
procedure TKeyboard.KeyPress(key: EKeyCode);
Presses the given virtual key.
Keyboard.IsKeyDown¶
procedure TKeyboard.IsKeyDown(Key: EKeyCode);
Returns True if the given virtual key is currently down.
Keyboard.Send¶
procedure TKeyboard.Send(text: String);
procedure TKeyboard.Send(text: String; keyPressAfter: EKeyCode); overload;
Writes the given text to whatever window is currently in focus.
First overload allows you to pass KeyWait, KeyModWait, and KeyPressWait, all are timing modifiers.
Last overload allows you to pass a long a key to be pressed after the text has been typed, for example VK_ENTER
.
Keyboard variable¶
Global TKeyboard variable.