Lua:keyDown

From Cheat Engine
Revision as of 18:00, 11 July 2025 by Leunsel (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

function keyDown(Key)

Causes the specified key to go into the "down" (pressed) state. This simulates pressing and holding the key.

Function Parameters

Parameter Type Description
Key Integer or Virtual-Key Code The virtual key code of the key to press down (e.g., VK_F1, VK_SHIFT).

Examples

-- Simulate pressing and holding the left control key
keyDown(VK_LCONTROL)

-- Simulate pressing and holding the "A" key
keyDown(VK_A)

See also