Lua:doKeyPress
Jump to navigation
Jump to search
Simulates a key press by sending a key down followed by a key up event for the specified key.
Function Parameters
| Parameter | Type | Description |
|---|---|---|
| Key | Integer or Virtual-Key Code | The virtual key code of the key to press (e.g., VK_F1, VK_SHIFT).
|
Examples
1 -- Simulate pressing the Enter key
2 doKeyPress(VK_RETURN)
3
4 -- Simulate pressing the "A" key
5 doKeyPress(VK_A)