Use a timer to distinguish between long press ,short press and double-click.
This sample uses the native_posix solution, so no need for a real board. You’ll need to have a SDL library installed.
west build -p -b native_posix_64 samples/sdlbutton2