dot big bang

Developer API
Menu

Class Keyboard

All
  • Public
  • Public/Protected
  • All

Hierarchy

  • Keyboard

Index

Methods

getHeldTime

  • getHeldTime(key: Key): number
  • Returns how long the key has been held (0 if it's not held) in seconds.

    Parameters

    Returns number

isKeyJustPressed

  • isKeyJustPressed(key: Key): boolean
  • Indicates whether the given key was just pressed this frame.

    Parameters

    Returns boolean

isKeyJustReleased

  • isKeyJustReleased(key: Key): boolean
  • Indicates whether the given key was just released this frame.

    Parameters

    Returns boolean

isKeyPressed

  • isKeyPressed(key: Key): boolean
  • Indicates whether the given key is pressed (either just pressed this frame, or being held from previous frames)

    Parameters

    Returns boolean