Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pandora-y opened this issue Sep 27, 2022 · 1 comment
Open

Comments

@pandora-y
Copy link

_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.

@pandora-y
Copy link
Author

keyState should be declared in _keydown function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant