mathertel/OneButton

possible to add quick press + long press?

madsi1m opened this issue · 3 comments

Hi is it possible to add call back for a quick press followed by a long press as an event?

For example, like click and drag on a touchpad.

FYI, The "quick press followed by a long press" combo is what DJI uses to power toggle their drones. I think it's safer because it requires a bit more intentionality to get it switch on or off.

There is a new "press" event added to the library in #141.
This will be part of the next release.

Thanks so much for looking at this issue!

When you do the docs for the new release, can please you add an example of how to use the new "press" event to accomplish "quick press followed by a long press"? Thanks again!