Keypad 3x4 help.

I was wondering if anyone here had an idea on how to write a code to allow you type words and numbers to serial with a 3x4 keypad.
You know like old cell phones where you had to press key [2] 3 times to get the letter C, or key [0] for spacing?

I would like to find a way how to do that but I no idea on how to even start lol

I would like to output that to my liquid crystal display I have here.

Any help please?

My first guess would be something like this.

Make a buffer to hold the message.

When a key is pressed, mark the time. IF it is a different key from the last press OR a certain length of time has passed since the last press of the same button then move to the next position in the buffer and enter the first letter (the A in ABC for #2 for instance) ELSE (it's the same button as the last press and it hasn't been very long since the last press) change the character in the current position to the next letter (from A to B for example) for that button.

I just posted this in the playground.

See here Cell Phone Keypad

It may be a little confusing, but once you try it, you will understand what its doing.