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

Combos with repetition of the same character breaks the other listeners. #117

Closed
abuduba opened this issue Sep 13, 2016 · 3 comments
Closed
Labels
Bug Issues that are bugs or are likely bugs that need fixing.

Comments

@abuduba
Copy link

abuduba commented Sep 13, 2016

Having some key combinations:

keyboardJS.bind('1+1', () => console.log('11'));
keyboardJS.bind('1+2', () => console.log('12'));
keyboardJS.bind('1+3', () => console.log('13'));

It's not possible to handle neither 12 nor 13 due to 11 executes its callback on the first click on "1".

It's pretty much the same like in the other hotkey plugin: dmauro/Keypress#120

@RobertWHurst RobertWHurst added the Bug Issues that are bugs or are likely bugs that need fixing. label Oct 11, 2016
@RobertWHurst
Copy link
Owner

Perhaps this should raise an exception. You shouldn't be able to bind 1+1.

@abuduba
Copy link
Author

abuduba commented Nov 11, 2016

Hi, Thanks for the reply and sorry for the delay.
There was some misunderstanding from my side.
Sorry for confusion.
I thought the lib supports key sequences, so i can for example react on combination "11" by pressing on "1", release it and press again the same key, or some other case like trigger some action when user puts some "secret" word or something like that.

Suppose the "bug" might be closed.
BTW, do you have in plan supporting the sequences like that?

@RobertWHurst
Copy link
Owner

@abuduba No worries. I do, but I haven't had time to work on it as of late. I'll let you know if this feature is added 🍻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues that are bugs or are likely bugs that need fixing.
Projects
None yet
Development

No branches or pull requests

2 participants