Difference between revisions of "Lua:keyUp"
Jump to navigation
Jump to search
m (Added CodeBox Template.) |
|||
| (2 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
| − | + | [[Category:Lua]] | |
| + | {{CodeBox|'''function''' keyUp(''Key'')}} | ||
| + | |||
| + | Causes the specified key to go into the "up" (released) state. | ||
| + | This simulates releasing a key that was previously pressed. | ||
| + | |||
| + | ===Function Parameters=== | ||
| + | {|width="85%" cellpadding="10%" cellspacing="0" border="0" | ||
| + | !align="left"|Parameter | ||
| + | !align="left"|Type | ||
| + | !style="width: 60%;background-color:white;" align="left"|Description | ||
| + | |- | ||
| + | |Key | ||
| + | |Integer or [[Virtual-Key Code]] | ||
| + | |The virtual key code of the key to release (e.g., <code>VK_F1</code>, <code>VK_SHIFT</code>). | ||
| + | |} | ||
| + | |||
| + | ===Examples=== | ||
| + | <pre> | ||
| + | -- Simulate releasing the left control key | ||
| + | keyUp(VK_LCONTROL) | ||
| + | |||
| + | -- Simulate releasing the "A" key | ||
| + | keyUp(VK_A) | ||
| + | </pre> | ||
| + | |||
| + | {{LuaSeeAlso}} | ||
| + | |||
| + | {{KeyboardMouse}} | ||
Latest revision as of 23:56, 4 December 2025
| <> Function function keyUp(Key) |
Causes the specified key to go into the "up" (released) state. This simulates releasing a key that was previously pressed.
Function Parameters[edit]
| Parameter | Type | Description |
|---|---|---|
| Key | Integer or Virtual-Key Code | The virtual key code of the key to release (e.g., VK_F1, VK_SHIFT).
|
Examples[edit]
-- Simulate releasing the left control key keyUp(VK_LCONTROL) -- Simulate releasing the "A" key keyUp(VK_A)
See also[edit]
| Lua |
| Script Engine |
Related Functions[edit]
| getMousePos |
| setMousePos |
| isKeyPressed |
| keyDown |
| keyUp |
| doKeyPress |
| mouse_event |
| setGlobalKeyPollInterval |
| setGlobalDelayBetweenHotkeyActivation |