You need to think about what problem you are trying to solve with debouncing.
One possibility is that a single button press produces a series of separate ON/OFF events because the contacts don't close or open cleanly. If the Arduino repeats the digitalRead() very quickly it can capture those unwanted events.
If this is the problem then all you need to do is act on the first keypress and then ignore any others for a short time - perhaps a few millisecs. Or perhaps you can disable reading the key until whatever it started has finished (assuming you don't want to use the same key to interrupt the activity)
Another possibility is that spurious key presses are detected even though the key is not touched. Usually this is because the input is floating (i.e. not tied to GND or 5v). But it could happen due to inteference picked up by (say) a long cable.
In that case the phantom key press is probably very short and the simplest way to weed it out is to ignore a key press unless it is held ON for some minimum time - again, perhaps, a few millisecs.
...R