Need help with voltage thingy

But then how do they keys get the power? Or how does it detect a key press?