Description

Calling a function when a key is pressed (only once)

Usage

Parameters

  • key {Integer|Array}

    Value of the key (or keys if array). Input.A or [Input.A, Input.Z] for example

  • onPressKey {Function}

    Function called when a key is pressed. One parameter: the event of the button (Event Object)

Discussion