The keyboard issue was probably caused by the battery, which can be replaced, and the keyboard would have likely returned to normal after the battery replacement.
In fact, depending on the model, the battery replacement may well have also entailed replacing the whole top cover (including the keyboard).
The Intel MacBook Air battery was very easy to swap, just opening the bottom lid. Amazon has kits for about 40 bucks with the two necessary screwdrivers included.
In fact, depending on the model, the battery replacement may well have also entailed replacing the whole top cover (including the keyboard).