1. Check the keyboard layout
Open the language settings and confirm the layout matches your keyboard, such as UK or US. A wrong layout swaps symbols and letters.
2. Check the input method
Remove input languages you do not use, because switching between them can change the characters that appear.
3. Test on another device
Type in a plain text editor on another computer. If the problem remains, the keyboard may be faulty and need replacing.