How to make @ key work?
Maybe your keyboard does not match the settings in your System Preferences. It would be good to include the layout of your keyboard i.e. English UK, English US, or maybe another language's default.

To check your System Preferences setup go: System Preferences --> Keyboard --> Input Sources. There you will find which button layout is set.

By matching that to your actual keyboard layout you may be successful resolving your issue.