Fix keyboard mapping mixup on OSX
I dock my Mac laptop and use an external keyboard. I map my dell keyboard so that the command key is in the same place as on the laptop. This lets me use the alt key as command and the windows key as the alt/option key. I had a problem when I undocked, the laptop mixed up the key mapping and the alt and command keys were reversed. I used the keyboard setting tab multiple times to reset the keys do default without any success. To fix the problem I plugged in both keyboards and selected the all option from the keyboard drop down list. Then I deleted /Library/Preferences/com.apple.keyboardtype.plist and reconfigured both keyboards. I spend weeks trying to figure out why my keyboard mapping was wrong on my laptop.