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

event to fire immediately, when button is pressed #139

Closed
dpuschek opened this issue Apr 4, 2024 · 1 comment
Closed

event to fire immediately, when button is pressed #139

dpuschek opened this issue Apr 4, 2024 · 1 comment

Comments

@dpuschek
Copy link

dpuschek commented Apr 4, 2024

Hello,

I tried out OneButton for a project, where I need Short and Long Clicks at two button. That works like a charm! Thank you!
But I also need also a normal button, that is fired immediately. So I attached only a attachClick event to the third button and not any "attachLongPress"-event. Unfortunately, this button only works after a short click is released and does nothing when a long press is done or hold. Is there a way to fire immediately with a OneButton event? For this button I just need the 50ms debounce time, so it isn't triggered multiple times by one press. It would be a pity, if I need an additional library for debouncing.

@mathertel
Copy link
Owner

This event (press) was added in #141 and will be part of the next release.

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

2 participants