Skip to content

KeyPressed

Description

KeyPressed is a Function on Input
Returns true if the given key was pressed this tick. The name for each key follows Unity's KeyCodes (https://docs.unity3d.com/ScriptReference/KeyCode.html), for example: Alpha1 or E.

Example
local testVariable = Input.KeyPressed("Toaster")
Usage

network usage: Any (Client or Server/Host)
returns: bool
parameters:
- key (string)