Skip to content

The keyState variable is not declared in the keydown event function #384

@pandora-y

Description

@pandora-y

_proto._keydown = function _keydown(e) {
var handler = null,
index,
index2,
keyBindKeys,
allModifiersPressed;
var pressedKeys = [],
pressedModifiers = {},
currentKey = e.which,
pressed = 'p';
keyState[currentKey] = pressed;

  for (index in keyState) {
    if (keyState.hasOwnProperty(index) && keyState[index] === pressed) {
      pressedKeys.push(index);

      if (parseInt(index, 10) !== currentKey) {
        pressedModifiers[index] = true;
      }
    }
  }

keyState should be declared.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions