key pressed vs. key held code?

I am making some routines for a bunch of buttons and I want to implement some code so that there is a difference between a button pressed and button held so that I can do key combos (e.g. like holding function+some key)?

Is there a standard way to implement this or a library for this standard functionality?

I can think of a few ways to do this but would like to see some other solutions. Especially ones that are also working with the debouncing routines.

It's not in the standard Arduino libraries, but a very clever and generous Arduino developer has donated it to the world. Look here.

This looks to be a very promising library found in the Arduino playgroud. I've read it over and plan on using it, but haven't much experiance with it. However it sounds just what you might be looking for.

http://www.arduino.cc/playground/Code/Button

Lefty