[eli5] How does a button on keyboard or mouse slowly become non functioning


so i had a mouse the recently the left mouse button suddenly stoppwd working so now was wondering how the buttons work

In: 2

Even if it is a membrane keybaord there are still mechanical parts. All mechanical parts are prone to breaking

Even at its very basic, there is a wire underneath the key that gets pressed into another wire, completing a circuit, letting the computer know that key got pressed.

If either of those wires are damaged, and the circuit can’t complete, then the key stops working.