How to restore my keyboard to default settings? I was using Google Colab on my web browser and was trying to set some keyboard shortcut on Google Colab. 

After that, my keyboard keep showing weird letters when I am typing. You can see it in this image:



I tried to solve this by going to system preferences &gt; keyboard. Then setting shortcuts and input sources to defaults. But it is not working. I tried various other approaches from articles on the internet but I still couldn't fix it. 

Can anyone help me to fix this problem?

Mac version - macOS Mojave version 10.14.5

Web browser - Firefox version 74.0

Just to clarify, the problem is not totally related to the Firefox browser. It is also happening when I am using any other applications on my system like the text editor for writing code etc. It is a system wide problem.
The default behaviour in macOS since 2011 is to display a menu of accent characters when holding down keys on the keyboard.

If you don't like this behaviour, you can go into the Terminal and disable it:

defaults write -g ApplePressAndHoldEnabled -bool false



  Once you’ve executed the command, log out and log back in to your user account. When you log back in, the accented characters will be disabled. Pressing and holding down a key on your keyboard will only repeat it.


This tip originated from https://www.addictivetips.com/mac-os/disable-accented-characters-on-macos/