Methods
-
add_key(key)
-
Creates a Phaser key object.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description key
keycode of the key to create
Code Equivalent:
game.input.keyboard.addKey(Phaser.Keyboard.key)
-
get_key_boolean_field(field, key)
-
Returns the chosen boolean field value of the key.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description field
the value to get
key
key to get values from
Code Equivalent:
game.input.keyboard.addKey(Phaser.Keyboard.key)
-
get_key_numeric_field(field, key)
-
Returns the chosen numeric field value of the key.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description field
the value to get
key
key to get values from
Code Equivalent:
key.field
-
is_key_down(key)
-
Returns true/false about whether or not the given key is currently being pressed down.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description key
key to check
Code Equivalent:
game.input.keyboard.isDown(Phaser.Keyboard.key)
-
key_just_pressed(key)
-
Returns true/false if the given key was pressed down this update tick.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description key
key to check
Code Equivalent:
key.justPressed()
-
key_just_released(key)
-
Returns true/false if the given key was released down this update tick.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description key
key to check
Code Equivalent:
key.justReleased()
-
key_reset(key, hard)
-
Resets the state of the key. Hard reset removes any callback methods associated with it.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description key
key to reset
hard
Boolean whether or not to hard reset the key
Code Equivalent:
key.reset(hard);
-
key_up_duration(key, duration)
-
Returns true/false if the given key was pressed within the given amount of time.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description key
key to check
duration
Number duration within which the key is considered as just pressed
Code Equivalent:
key.upDuration(duration)
-
key_up_duration(key, duration)
-
Returns true/false if the given key was released within the given amount of time.
Check out the third party documentation for a more in depth explanation.Parameters:
Name Type Description key
key to check
duration
Number duration within which the key is considered as just released
Code Equivalent:
key.upDuration(duration)