When you open a text editor and type something, the keyboard starts typing the same letter on its own until you press on the problematic key. After that, the keyboard may work fine for a while but eventually, the same problem happens again.
The keyboard has a stuck key. Contact under the key is shorted.
Possible troubleshooting steps and repair solution:
If the keyboard starts typing the same letter on its own, press very firmly on the stuck key a few times.
If the problem happens again, you’ll have to replace the keyboard. The keyboard is a sealed unit and cannot be disassembled for repair.