A mechanical keyboard can last for decades with each switch being good for millions of keystrokes. The lifespan of a keyboard can vary, but some devices can last more than ten years with constant use. It's impossible to predict when a keyboard will malfunction, but you can replace it before it completely stops working.