Skip to main content

InputManager.GetKeyDown

Declaration#

public virtual bool GetKeyDown(KeyCode key)

Parameters#

NameDescription
keyKey to read

Description#

Returns true during the frame the user starts pressing down the key identified by name

Usage#

Example
InterfaceManager.Input.GetKeyDown(KeyCode.Return);

Declaration#

public virtual bool GetKeyDown(string key, Int32 playerId)

Parameters#

NameDescription
keyKey to read
playerIdId of player to check

Description#

Returns true during the frame the user starts pressing down the key identified by name

Usage#

Example
InterfaceManager.Input.GetKeyDown(KeyCode.Return, 0);