I'd like to use a numeric keypad to have the user input a time (in HH:MM:SS format), and then be able to set a timer based on that input. The problem is that the user, if they want to enter 1m30s, won't be hitting 0-0-0-1-3-0. They'll just hit 1-3-0.
(to summarize: when user hits 1, display will show: 00:00:01. When they hit 3, it'll show: 00:00:13. When they hit 0, it'll show: 00:01:30.)
So how do I transpose the input into something usable? I can figure out how to display the input on the screen by sliding each number left one after a keypress, I just can't figure out how to get the corresponding millis out of it.
I've thought about dropping each keypress into it's own variable as there are only 6 total (keypress1 = 1, etc.), but I still can't figure out how to manipulate the numbers.
Thoughts?