Keyboard is inserting the pipe character everytime the shift key is used

Solution 1:

Can confirm that this problem was only solved by replacing the keyboard.

The issue is intermittent printing of a pipe (|) character when pressing the Shift key. Moving the keyboard from a laptop running Windows 7 to an iMac produced a similar issue, but this time the Shift key intermittently printed the +/- symbol.