# Keyboard Methods to use the keyboard. - - - ## TKeyboard Main record responsible with handling {ref}`Keyboard` input. - - - ## Keyboard.Setup ```pascal procedure TKeyboard.Setup(); ``` Sets up internal {ref}`TKeyboard` values. This is automatically called for you on the {ref}`Keyboard variable`. - - - ## Keyboard.KeyDown ```pascal procedure TKeyboard.KeyDown(key: EKeyCode); ``` Presses down the given virtual key. - - - ## Keyboard.KeyUp ```pascal procedure TKeyboard.KeyUp(key: EKeyCode); ``` Releases the given virtual key. - - - ## Keyboard.KeyPress ```pascal procedure TKeyboard.KeyPress(key: EKeyCode); ``` Presses the given virtual key. - - - ## Keyboard.IsKeyDown ```pascal procedure TKeyboard.IsKeyDown(Key: EKeyCode); ``` Returns True if the given virtual key is currently down. - - - ## Keyboard.Send ```pascal 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 {ref}`TKeyboard` variable.