Default locale and keyboard settings on the Raspberry Pi can be configured using raspi-config on Rasbian.
Select option 4 Internationalization, and select options to configure your locale, timezone and connected keyboard layout.
If you’ve installed Raspbian and kept the defaults you probably ended up with a UK keyboard layout, and if you have a US keyboard, you’re wondering why some of your keys are producing unexpected characters 🙂