Key#upDuration()

upDuration(duration) → {boolean} Returns true if the Key was pressed down within the duration value given, or false if it either isn't down,or was pressed down longer ago than then given duration. Parameters Name Type Argument Default Description duration number <optional> 50 The duration within which the key is considered as being just released. Given in ms. Returns boolean - True if the key was released within the given duration. Source code: input/Key.js (Line 269)

Key#timeUp

timeUp : number The timestamp when the key was last released. This is based on Game.time.now. Source code: input/Key.js (Line 82)

Key#timeDown

timeDown : number The timestamp when the key was last pressed down. This is based on Game.time.now. Source code: input/Key.js (Line 68)

Key#shiftKey

shiftKey : boolean The down state of the SHIFT key, if pressed at the same time as this key. Source code: input/Key.js (Line 63)

Key#reset()

reset(hard) Resets the state of this Key. This sets isDown to false, isUp to true, resets the time to be the current time, and enables the key.In addition, if it is a "hard reset", it clears clears any callbacks associated with the onDown and onUp events and removes the onHoldCallback. Parameters Name Type Argument Default Description hard boolean <optional> true A soft reset won't reset any events or callbacks; a hard reset will. Source code: input/Key.js (Line 222)

Key#repeats

repeats : number If a key is held down this holds down the number of times the key has 'repeated'. Source code: input/Key.js (Line 88)

Key#onUp

onUp : Phaser.Signal This Signal is dispatched every time this Key is released. It is only dispatched once (until the key is pressed and released again). Source code: input/Key.js (Line 113)

Key#onHoldContext

onHoldContext : Object The context under which the onHoldCallback will be called. Source code: input/Key.js (Line 108)

Key#onHoldCallback

onHoldCallback : Function A callback that is called while this Key is held down. Warning: Depending on refresh rate that could be 60+ times per second. Source code: input/Key.js (Line 103)

Key#onDown

onDown : Phaser.Signal This Signal is dispatched every time this Key is pressed down. It is only dispatched once (until the key is released again). Source code: input/Key.js (Line 98)