The standard boot configuration of the Raspberry pi can lead to some characters not working properly on US keyboards. In particular, the shift-number characters like !,~,# can not be where you expect them. The easiest way to fix this is to edit the nano /etc/default/keyboard file. The following should fix things for you.
$ sudo nano /etc/default/keyboard
Then on the line for XKBLAYOUT change it to:
That should make your pi work properly with most US keyboards.