Attached is an example of how to do the timing. Also, I've included a routine to count how many times the same button is clicked within the specified time limit. Cell phones need to track that so you can get to the letter "b" and such. I leave the interpretation of the number of repeats as an excercise to you.
🙂Hint: When the number of repeats = zero just use the number, but when it is 1,2,3,4.... use letters and/or symbols. You can also use the divide with remainder function to cycle back to the number on the 4th repeated click!
Have fun,
Daniel L. Press
PrimeTest Corp.
www.primetest.com