IsInputKeyDown

From Onset Developer Wiki
Revision as of 18:19, 21 January 2021 by BlueMountains (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
IsInputKeyDown

Type: Function
Context: Client
Introduced: v1.4.2

Description

Check if a key is currently pressed.

Syntax

IsInputKeyDown(key)

Parameters

  • key
    The key to check.

Return Value

  • Returns true if it is pressed, false otherwise

Example

AddEvent("OnGameTick", function()
	if IsInputKeyDown("Hyphen") then
		print("You are holding down the "-" key.")
	end
end)

See also