IsCtrlPressed

From Onset Developer Wiki
IsCtrlPressed

Type: Function
Context: Client
Introduced: v1.0

Description

Check if the player has pressed the Ctrl key.

Syntax

IsCtrlPressed()

Parameters

  • This function has no parameters.

Return Value

  • Returns true on success.

Example

AddEvent("OnKeyPress", function(key)
	if IsCtrlPressed() and key == 'R' then
		AddPlayerChat("You have pressed CTRL + R")
	end
end)

See also