Fork me on GitHub
View source

package haxepunk.input

class Input

Manage the different inputs.

Static variables

View source

static handlers : Array<InputHandler>

Array of currently active InputHandlers.

View source

static read only multiTouchSupported : Bool

Returns true if the device supports multi touch

Static functions

View source

static check (input : InputType) : Bool

If the input or key is held down.


Parameters:
input   

An input name or key to check for.


Returns:

True or false.

View source

static define (input : InputType, keys : Array<Key>) : Void

View source

static postUpdate () : Void

View source

static pressed (input : InputType) : Bool

If the input or key was pressed this frame.


Parameters:
input   

An input name or key to check for.


Returns:

True or false.

View source

static released (input : InputType) : Bool

If the input or key was released this frame.


Parameters:
input   

An input name or key to check for.


Returns:

True or false.

View source

static triggerPress (type : InputType) : Void

Trigger any callbacks meant for this type of input.


Available since:

4.0.0

View source

static triggerRelease (type : InputType) : Void

Trigger any callbacks meant for this type of input.


Available since:

4.0.0