Skip to content


Element.Event.Pseudo :keys doesn't work with resource-intensive functions #1091

simon-at-fugu opened this Issue · 0 comments

1 participant


When you attach a heavy function / much code on the keydown:keys event, it don't remove the key from "pressed", because the keyup event is fired before it's attached to it:



if (keys.every(function(key){
    return pressed.contains(key);
})) fn.apply(this, args);, pressed);

to:, pressed.include(event.key));

if (keys.every(function(key){
    return pressed.contains(key);
})) fn.apply(this, args);

may be better....

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.