IsCmdPressed

From Onset Developer Wiki
IsCmdPressed

Type: Function
Context: Client
Introduced: v1.0

Description

Check if the client has pressed the Ctrl key

Syntax

IsCmdPressed()

Parameters

  • This function has no parameters.

Return Value

  • Returns true if pressed, otherwise false

Example

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

See also