Class: KeyboardKey

rune.input.KeyboardKey()

The KeyboardKey class represents a keyboard key.

Constructor

new KeyboardKey()

Creates a new instance of the KeyboardKey class.
Source:

Members

(static, constant) JUST_PRESSED :number

Indicates that the key was just pressed.
Type:
  • number
Default Value:
  • 1
Source:

(static, constant) JUST_RELEASED :number

Indicates that the key has just been released.
Type:
  • number
Default Value:
  • -1
Source:

(static, constant) PRESSED :number

Indicates that the key is pressed.
Type:
  • number
Default Value:
  • 2
Source:

(static, constant) RELEASED :number

Indicates that the key is released.
Type:
  • number
Default Value:
  • 0
Source:

Methods

isJustPressed() → {boolean}

Checks whether the key was just pressed (true) or not (false).
Source:
Returns:
Type
boolean

isJustReleased() → {boolean}

Checks whether the key was just released (true) or not (false).
Source:
Returns:
Type
boolean

isPressed() → {boolean}

Checks whether the key is pressed (true) or not (false).
Source:
Returns:
Type
boolean

reset() → {undefined}

Resets the state of the current key.
Source:
Returns:
Type
undefined