IsInputKeyDown: Difference between revisions

From Onset Developer Wiki
No edit summary
No edit summary
 
(No difference)

Latest revision as of 18:19, 21 January 2021

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