New Magic Keyboard types the wrong symbols
The problem is that your Keyboard layout is set to Brazilian and not to the Layout that you are used to..

Go to System Settings -> Keyboard -> Input Sources...

There you will see that its the wrong input source.
To change it click on the plus symbol (+) in the left corner of the list and add the input source you want.