Skip to content

KeyHeld

Description

KeyHeld is a Function on Input
Returns true if the given key was held down 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.KeyHeld("Toaster")
Usage

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