Difference between revisions of "Lua:keyUp"

From Cheat Engine
Jump to navigation Jump to search
m (Syntax Highlighting.)
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<span style="font-size:25px;color:red">Sorry! Content not available.</span>
+
[[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===
 +
<syntaxhighlight lang="lua" line>
 +
-- Simulate releasing the left control key
 +
keyUp(VK_LCONTROL)
 +
 
 +
-- Simulate releasing the "A" key
 +
keyUp(VK_A)
 +
</syntaxhighlight>
 +
 
 +
{{LuaSeeAlso}}
 +
 
 +
{{KeyboardMouse}}

Latest revision as of 20:17, 25 June 2026

<> Lua API Reference

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]

1 -- Simulate releasing the left control key
2 keyUp(VK_LCONTROL)
3 
4 -- Simulate releasing the "A" key
5 keyUp(VK_A)

Main Pages

Core Lua documentation entry points

Lua
Script Engine

Mouse Related Functions

Keyboard Related Functions

Global Hotkey Related Functions