I've got a 15-inch MacBook Pro with the latest OS X. Every time I reboot, it resets the keyboard layout to American English even though I set it to Swiss German. This means that I always need to go to the language settings and change it to my layout, which is quite annoying.

Any suggestions how to solve this?

I also posted this question on Apple Support Discussions but wasn't getting any answers.

3 Answers 3


Things you could try:

  • Run sudo rm ~/Library/Preferences/com.apple.HIToolbox.plist ~/Library/Preferences/ByHost/com.apple.HIToolbox.*.plist /Library/Preferences/com.apple.HIToolbox.plist and restart. The current keyboard layout is stored in the first file in 10.9 and the second file in 10.8. The keyboard layout used in the login window and by the guest account is stored in the third file.
  • Run open -a KeyboardSetupAssistant to identify the keyboard.
  • Run sudo rm /var/db/.AppleSetupDone;sudo /System/Library/CoreServices/Setup\ Assistant.app/Contents/MacOS/Setup\ Assistant and create a new account. Set the default keyboard layout to Swiss German in the second step and enter anything else in the other steps. You can delete the account after you have created it.
  • I had a problem where the keyboard got set to US after a OS X upgrade. The fist one worked for me. Thanks! Commented Oct 15, 2016 at 4:49

I had this problem very often, though not always. I think it happened mainly (or always?) when the system was not shutdown or rebooted cleanly. Like in the case of a power loss.

Fixing my config and then copying my fixed $HOME/Library/Preferences/com.apple.HIToolbox.plist file to /Library/Preferences/ didn't work. The system settings file got overwritten on reboot.

What worked for me was to import my user keyboard settings to the default system settings with sudo :

sudo defaults import com.apple.HIToolbox.plist $HOME/Library/Preferences/com.apple.HIToolbox.plist

(This is with High Sierra. I don't know if it works the same with Mojave or Catalina)

  • I just tested on Catalina (10.15.7): the command has no effect (but no error either). "import" option is not documented in the default command's man page. Too bad, this solution using defaults command seemed better as it used official command to manipulate plist files, instead of just fuzing around with files.
    – CuriousFab
    Commented Dec 10, 2020 at 9:53

Had the same issue and the following worked for me. Run in Terminal:

sudo cp ~/Library/Preferences/com.apple.HIToolbox.plist /Library/Preferences/

then do:

sudo chmod 644 /Library/Preferences/com.apple.HIToolbox.plist

Afterwards restart without logging out.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .