Apple Inc. agreed to pay $50 million to settle a class-action lawsuit by customers who alleged the company knew and concealed that the butterfly keyboards in its MacBook laptops were defective and vulnerable.

The proposed preliminary settlement was filed Monday in federal court in San Jose, Calif., and is seeking a judge’s approval.

Customers have reported that MacBook Pro and MacBook Air keyboards have damaged keys that do not respond to commands, and a small amount of dust makes them difficult to press.

They also said that Apple’s maintenance program is inappropriate because the Cupertino, California company often provides replacement keyboards with the same issues.

The agreement applies to customers who purchased a MacBook, MacBook Air, and most MacBook Pro models between 2015 and 2019 in seven US states: California, Florida, Illinois, Michigan, New Jersey, New York, and Washington .

Apple has denied any wrongdoing in its settlement agreement. He has not yet responded to requests for comment.

Client advocates expect the maximum payouts to be $395 for people who changed keyboards multiple times, $125 for people who changed one keyboard, and $50 for people who changed keycaps.

Customers are also eligible for free keyboard repairs for four years after purchase.