USB Keyboard on MAC: \ and < characters inverted

I have a strange behaviour with an USB keyoboard connected to a MacBook Pro laptop. Mac OS X version: macOS Sierra 10.12.2 (16C67)

In the laptop the keys are correct, but with the external keyboard the \| keys is inverted with the <> key

How can I solve this issue? hanks.


Solution 1:

This can be caused when the OS mis-identifies the keyboard. To get that back, clear the preference that saves which device is which layout.

How to reset the mac keyboard

I made as described in the post:

  1. Delete the file /Library/Preferences/com.apple.keyboardtype.plist
  2. Disconnect the keyboard
  3. Reconnect the keyboard
  4. Restart the os

After doing these steps, the keyboard had to be recognized again, and it fixes the issue.

The correct keyboard for Italian is ISO (Eur).