mathertel/OneButton

event to fire immediately, when button is pressed

dpuschek opened this issue · 1 comments

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.

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