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

Sequence Timing #68

Closed
ronnyek opened this issue Dec 19, 2014 · 3 comments
Closed

Sequence Timing #68

ronnyek opened this issue Dec 19, 2014 · 3 comments
Labels

Comments

@ronnyek
Copy link

ronnyek commented Dec 19, 2014

I've created a sequence that when I hit " " (tick tick) I want it to trigger an action.

I can get it to trigger, and it pops up an alert as expected, but then the very next tick I type into say a text field, its popping up the alert again.

My question is, is there any time threshold or setting for that per sequence so that I can say if I typed two ticks in a row, within 500ms, treat it as a sequence, otherwise just let the characters through?

The other thing to note, even though it was triggering the desired action, it was not actually blocking the keypresses in those events (ticks ended up in the textbox)

@dmauro
Copy link
Owner

dmauro commented Dec 23, 2014

So the last bit is easy: you have to manually set prevent_default to true to prevent default browser behavior for keys involved in a combo.

The default sequence delay is 800ms (I should make that easy for users to tweak) and as long as you hit the next key in a sequence before that 800ms is up, it will consider that input as working towards any possible combos that include them (and will prevent the default browser behaviors if that sequence combo is set to prevent default).

The first part of your issue is the trickiest, but it sounds like there is a bug in the code that is matching inputs to sequences and it keeps matching the double tick combo every time you hit the sequence instead of every other time (if I'm reading that right). I'll have to look into that.

@dmauro
Copy link
Owner

dmauro commented Jan 16, 2015

Just confirmed there is definitely a bug when you try to do a sequence of two of the same characters. Thank you!

@dmauro dmauro added the bug label Jan 16, 2015
dmauro added a commit that referenced this issue Aug 16, 2015
@dmauro
Copy link
Owner

dmauro commented Aug 16, 2015

326c417

@dmauro dmauro closed this as completed Aug 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants