There is an example of a programme that differentiates between long and short push-button pushes on the Arduino.cc website, but I was not taken it. However their was an example I did like the look of, ...
A web-based Arduino simulator developed as part of the FOSSEE Open Source Hardware Internship 2025. This project allows users to visually build a simple Arduino circuit, configure pin connections, ...