Hi!
Part of my future smart gamepad, and already part of my Hexapod framework, here is a SmartButton class, which can handle press/release/click/double-click/hold/double-hold triggers (triple-click/triple-hold can be add without problem). Based on a FSM.
Feel free to test/comment/review!