class openfl.events.GameInputEvent extends Event

Available on all platforms

The GameInputEvent class represents an event that is dispatched when a game input device has either been added or removed from the application platform. A game input device also dispatches events when it is turned on or off.

Class Fields

static var DEVICE_ADDED:String

Indicates that a compatible device has been connected or turned on.

static var DEVICE_REMOVED:String

Indicates that one of the enumerated devices has been disconnected or turned off.

static var DEVICE_UNUSABLE:String

Dispatched when a game input device is connected but is not usable.

Instance Fields

var device:GameInputDevice

Returns a reference to the device that was added or removed. When a device is added, use this property to get a reference to the new device, instead of enumerating all of the devices to find the new one.

function new(type:String, ?bubbles:Bool = true, ?cancelable:Bool = false, ?device:GameInputDevice = null):Void

function clone():Event

function toString():String