Lua:setGlobalKeyPollInterval

From Cheat Engine
Revision as of 04:03, 21 June 2026 by Leunsel (talk | contribs) (Created page with "Category:Lua {{CodeBox|'''function''' setGlobalKeyPollInterval(''interval'') ''':''' void}} Sets the global key poll interval. The interval determines how often Cheat En...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
<> Function

function setGlobalKeyPollInterval(interval) : void

Sets the global key poll interval.

The interval determines how often Cheat Engine checks whether a key has been pressed. Lower values are more accurate and responsive, but use more CPU power.

Function Parameters[edit]

Parameter Type Description
interval Integer The global key poll interval. Lower values check for key presses more often, but use more CPU power.

Returns[edit]

void — This function does not return any value.

Examples[edit]

-- Check for key presses more frequently
setGlobalKeyPollInterval(10)

-- Use a higher interval to reduce CPU usage
setGlobalKeyPollInterval(100)

See also[edit]

Lua
Script Engine