When you are at the login window in OS X, your system should be set to use the default keyboard layout you chose when you initially set up your Mac; however, there may be instances where this layout changes, which in some cases can frustrate your ability to enter your username and password. While you can change your keyboard layout from the login window through the input menu (provided you have it enabled), this should not be required every time you use your Mac.
This problem can happen after upgrading or updating your OS, migrating from another system, or restoring from a backup. If this problem happens to you, then there are several approaches you can take for restoring your desired keyboard layout.
Remove the Human Interface Toolbox settings
As with other input settings, the default keyboard is stored on a per-user basis in each account; however, not being under a specific user name, the login window relies on global preference settings, which are stored in the global Library folder at the root of your boot drive.
Replace the global HIToolbox settings
You have a similar file in your user library folder as the global HIToolbox settings, that stores your personal preferences and overrides those in the global preferences file. When you change your preferred keyboard layout, this file is modified and then loaded when you log into your account. Unfortunately the system preferences only modifying this file means you cannot make a settings change that will adjust the global keyboard layout; however, you can still do so by making the desired setup changes in your user account and then replacing the global settings file with this one:
- Select your preferred keyboard layout in your account.
- Hold the Option key and choose Library from the Go menu in the Finder.
- Go to the Preferences folder in the window that opens.
- Copy the file “com.apple.HIToolbox.plist” to the Macintosh HD > Library > Preferences folder, replacing the file that is there.
- Now ensure the file has proper permissions for a global settings file, by opening the OS X Terminal utility (from the Applications > Utilities folder) and running the following two commands:
sudo chown root:wheel /Library/preferences/com.apple.HIToolbox.plist; sudo chmod 644 /Library/preferences/com.apple.HIToolbox.plist
Relaunch Setup Assistant
A final approach to addressing this problem is to force the OS X Setup Assistant to launch, which is used on a new Mac to set up keyboard layouts among the first Admin account, Apple IDs, and other details. You can run this assistant on a current Mac without affecting any of your account data, but in doing so can make use of its keyboard layout selection options to choose the layout you desire.
- Open the OS X Terminal utility
- Run the following command:
sudo rm /var/db/.AppleSetupDone
- Restart your Mac
When your system loads OS X again, it will launch the setup utility and run you through the on-screen steps for setting up your system. Follow the on-screen instructions, and then you should be able to log into your account using the keyboard layout you selected in the setup assistant. This assistant will only run once, so to force it to launch again, you will need to repeat the above Terminal command.
This article caused problems, it didn’t fix any. The first series of steps seemed to have no affect when I reset, the second option (to use OS X Setup Assistant) led to another admin account being created which it then took me almost an hour to delete again because the instruction I found for that didn’t tell me to not be logged into the other account using fast account switching.
same for me…
At least this part of the article *Replace the global HIToolbox settings* fixed my problem.
to where and why do you have to copy
com.apple.HIToolbox.plist