keypress
Synthesize a key tap using Windows virtual-key codes.
Syntax
keypress(virtualKey: string) -> nil
Parameters
| Parameter | Type | Description |
|---|---|---|
virtualKey | string | The virtual key value used by the call. |
Returns
| Type | Description |
|---|---|
nil | This function does not return a value. |
Description
keypress is part of the Input & clipboard library. Input helpers read or synthesize OS input and only report state while the game window is focused.
The operation is performed immediately using the arguments supplied at the call site.
The aliases keyrelease(virtualKey) resolve to the same implementation.
Example
keypress(0x41)
keyrelease(0x41)
Notes
- Aliases:
keyrelease(virtualKey). - Input status is focus-gated and only reports while the game is active.