Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Input

Hierarchy

  • Input

Index

Constructors

Protected constructor

Properties

Static date

date: number

[read-only] The time of the last input in milliseconds.

static
property

date

Static dir4

dir4: number

[read-only] The four direction value as a number of the numpad, or 0 for neutral.

static
property

dir4

Static dir8

dir8: number

[read-only] The eight direction value as a number of the numpad, or 0 for neutral.

static
property

dir8

Static gamepadMapper

gamepadMapper: Object

A hash table to convert from a gamepad button to a mapped key name.

static
property

gamepadMapper

Static keyMapper

keyMapper: Object

A hash table to convert from a virtual key code to a mapped key name.

static
property

keyMapper

Static keyRepeatInterval

keyRepeatInterval: number

The interval of the key repeat in frames.

static
property

keyRepeatInterval

Static keyRepeatWait

keyRepeatWait: number

The wait time of the key repeat in frames.

static
property

keyRepeatWait

Methods

Static clear

  • clear(): void

Static initialize

  • initialize(): void

Static isLongPressed

  • isLongPressed(keyName: string): boolean
  • Checks whether a key is kept depressed.

    static
    method

    isLongPressed

    Parameters

    • keyName: string

      The mapped name of the key

    Returns boolean

    True if the key is long-pressed

Static isPressed

  • isPressed(keyName: string): boolean
  • Checks whether a key is currently pressed down.

    static
    method

    isPressed

    Parameters

    • keyName: string

      The mapped name of the key

    Returns boolean

    True if the key is pressed

Static isTriggered

  • isTriggered(keyName: string): boolean
  • Checks whether a key is just pressed.

    static
    method

    isTriggered

    Parameters

    • keyName: string

      The mapped name of the key

    Returns boolean

    True if the key is triggered

Static nisRepeated

  • nisRepeated(keyName: string): boolean
  • Checks whether a key is just pressed or a key repeat occurred.

    static
    method

    isRepeated

    Parameters

    • keyName: string

      The mapped name of the key

    Returns boolean

    True if the key is repeated

Static update

  • update(): void

Generated using TypeDoc