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, ...
The hardware includes an ARM® mbedâ„¢ shield and attached sensor endpoint. The shield contains a DS2476 DeepCover® ECDSA/SHA-2 coprocessor, Wifi communication, LCD push-button controls, and status LEDs.