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

Fire control clicks immediately and start looping after a short delay #30

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mdingena
Copy link

@mdingena mdingena commented Sep 3, 2021

Context

When clicking a control button too quickly (as in, mouse isn't held down longer than 100 ms) the click doesn't register at all. A better user experience would be that any click, no matter how long pressed down, would register at least once.

Another good user experience is to start repeating clicks (due to holding down the control button) only after a brief delay. This is so that minute change can be made with single clicks without the risk of accidentally triggering the fast loops (100ms cycles).

Closes #27

Changes

  • Added a call site for controlClick() outside of the setInterval() body. This will trigger a call immediately when clicking a control button.
  • Wrapped the setInterval() loop in a setTimeout() to delay the loop by half a second (in line with other Windows user experiences, such as holding down a key on your keyboard).

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

Successfully merging this pull request may close these issues.

Move buttons don't respond to quick interactions
1 participant