Skip to content

Event triggers on any key after first occurrence on specified key #76

Description

@dandv

JSBin

<!doctype html>
<html lang="en-US">

<head>
<script src="https://rawgit.com/dandv/KeyboardJS/master/keyboard.js"></script>
</head>

<body>

<script>
KeyboardJS.on('k', function () {
  alert('Pressed k');
});  
</script>

</body>
</html>

After I press k and dismiss the alert in the latest Chrome, any keypress will trigger the function. This seems like a pretty big bug, so maybe I haven't read the docs correctly, or there needs to be a gotcha for this simple usage?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions