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

Cancel sequence hotkey when interrupted by other characters? #57

Open
sa-0001 opened this issue Apr 29, 2017 · 0 comments
Open

Cancel sequence hotkey when interrupted by other characters? #57

sa-0001 opened this issue Apr 29, 2017 · 0 comments

Comments

@sa-0001
Copy link

sa-0001 commented Apr 29, 2017

The following sequence works as expected:

combokeys.bind('q n', function(){ ... })'

However if I bind a combination as well as the sequence:

combokeys.bind(['q+n', 'q n'], function(){ ... })'

or bind the sequence first and then the combination:

combokeys.bind('q+n', function(){ ... })'
combokeys.bind('q n', function(){ ... })'

then both the combination and sequence correctly call the handler, but pressing a key inbetween the q and n, also causes the handler to be called.

q+n -> handler called
q n -> handler called
q f n -> handler also called

Is this a limitation of the library, or is there a way to disallow extraneous keys inbetween sequence keys?

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