Mechanical keyboards can last for several years, with some lasting over a decade. The lifespan of a keyboard depends on the quality of its mechanical switches and how often it is used. While it's impossible to predict when a keyboard will malfunction, it's recommended to replace it before it becomes completely unusable.