Resetting the USB keyboard type on Mac OSX
by rainer on Sep.30, 2009, under Mac

I have been troubled by this problems for a couple of days. I have a MS USB keyboard that I use with a Mac (I had it before switching to the Mac and still like it, believe it or not). Anyway, after I reconnected it one day Mac OSX asked me to identify the keyboard (even though I have been using it all along). Ever since then the keyboard behaved strange and the ^ and < keys were swapped, which is obviously quite annoying.
I asked our resident Mac expert and did a bit of googling but I could not find a solution. A couple of days later I could not stand it anymore and did some intense web research and I finally stumbled over this article.
You need to delete the following file in order to make Mac OS forget the keyboard type.
/Library/Preferences/com.apple.keyboardtype.plist
I disconnected the keyboard first, deleted the file, reconnected it and Mac OS asked me again to identify the keyboard. After that, everything worked like normal again.
Thanks to Riccardo Raneri, he saved my day.