cykod / Quintus

HTML5 Game Engine
http://html5quintus.com
GNU General Public License v2.0
1.41k stars 401 forks source link

Keyboard binding is broken #161

Closed JaredSartin closed 3 years ago

JaredSartin commented 9 years ago

The keyboard binding fails to look up the proper key code! Here is my bind definition:

Q.input.keyboardControls({
  LEFT: "left",
  RIGHT: "right",
  UP: "action",
  DOWN: "fire",
  Z: "action",
  X: "fire",
  SPACE: "action",
  ONE: "LesserScroot",
  TWO: "Scroot",
  THREE: "WaterElemental",
  Q: "LesserScroot",
  W: "Scroot",
  E: "WaterElemental",
});

Here is what is bound:

> Q.input.keys
  Object
    32: "action"
    37: "left"
    38: "action"
    39: "right"
    40: "fire"
    88: "fire"
    90: "action"
    E: "WaterElemental"
    ONE: "LesserScroot"
    Q: "LesserScroot"
    THREE: "WaterElemental"
    TWO: "Scroot"
    W: "Scroot"

Whats going on?