Here is how those two routines can be used to read a button:
#define KEY0 0 //key0 to pin 0
#define LED1 1 //led1 to pin 1
void loop(void) {
if (key_read(KEY0) == KEY_PRESSED) digitalWrite(LED1, !digitalRead(LED1)); //if key0 is pressed, flip led1
}
You can replace key_read() with key_read2() and they would function the same - the actually debouncing is totally transparent to the calling application.