API Documentation

for 0.0.1
Show:

Keyboard Class

Simple mapping from HTLM keyboard events toward Mobilizing.js. Not of a big interest for now...

Constructor

Keyboard

(
  • params
)

Parameters:

  • params Object

    Config parameters

    • [target=window] Window optional

      The DOM element this instance is attached to

Methods

getKeyIsDown

(
  • key
)
Boolean

Fast way to verify in an update loop if a specific key is currently down

Parameters:

  • key Object

Returns:

Boolean:

is down or not

onKeyDown

(
  • event
)
private

Forward the keydown event

Parameters:

  • event Object

onKeyPress

(
  • event
)
private

Forward the keypress event

Parameters:

  • event Object

onKeyUp

(
  • event
)
private

Forward the keyup event

Parameters:

  • event Object

Events

keydown

Fired when a new keydown event occures

keypressed

Fired when a new keypressed event occures

keyup

Fired when a new keyup event occures