 When the key is pressed, the foil tightly clings to the surface of the PCB, forming a daisy chain of two capacitors between contact pads and itself separated with thin soldermask, and thus "shorting" the contact pads with an easily detectable drop of capacitive reactance between them.Usually this permits a pulse or pulse train to be sensed.Because the switch doesn't have an actual electrical contact, there is no debouncing necessary.