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, ...
"Short Circuits" kits offer a hands-on way to learn about microcontrollers and circuits. Each kit is an entire electronics course, supported by detailed documentation. If you’ve ever wanted to ...