Where apps hide your files
A custom layout is a .keylayout file, and macOS only finds it if it sits in one of two Keyboard Layouts folders. Here are both, plus where the built-in layouts and input methods live and how to switch a new layout on.
For your own account only:
~/Library/Keyboard Layouts/
For every user on the Mac (needs an administrator password to write to it):
/Library/Keyboard Layouts/
Both folders exist on the Mac used for this guide, and both were empty, which is normal until you install a layout. The ~/Library folder is hidden in Finder, so choose Go > Go to Folder (or press ⇧⌘G), paste ~/Library/Keyboard Layouts and press Return. From Terminal:
open ~/Library/Keyboard\ Layouts
.keylayout file (or the .bundle that contains it) into one of the two folders above.Those labels come from the Keyboard settings extension on a Sequoia Mac. Tahoe and later releases may arrange the screen differently, so if a label differs, look for Text Input in Keyboard settings.
| File | What it is |
|---|---|
Name.keylayout | An XML description of which character each key produces, with and without modifiers. |
Name.icns | An optional icon shown in the Input menu. It sits next to the layout file and shares its name. |
Name.bundle | A package that can hold several layouts, an icon and localised names. Installers for non-English layouts often use this form. |
A .keylayout file is plain XML you can open in any text editor. SIL's Ukelele is the best-known editor for making one, and it can save a layout as a file or a bundle. Install layouts only from sources you trust: everything you type goes through the layout, passwords included.
The built-in layouts are not in either folder. They are inside the system's bundle:
/System/Library/Keyboard Layouts/AppleKeyboardLayouts.bundle
That path sits on the sealed system volume, so you cannot edit it. The bundle does not hold readable .keylayout files either (Apple's note says it contains no user-readable XML layouts). To tweak an Apple layout, have Ukelele start a new layout from it, change that and save the result into ~/Library/Keyboard Layouts.
Input methods, the kind used for Chinese, Japanese or Korean, are small apps, not layout files. Apple's own sit in /System/Library/Input Methods (for example JapaneseIM-RomajiTyping.app and KoreanIM.app). Third-party input methods install into:
~/Library/Input Methods/
/Library/Input Methods/
Both exist, empty, on the Mac used for this guide. If you installed a layout and it is missing from the list, check you did not put it in Input Methods by mistake, and the reverse.
The list of layouts you have switched on is not stored in the Keyboard Layouts folders. It is kept in your preferences file:
~/Library/Preferences/com.apple.HIToolbox.plist
Leave that file to the system. It holds your enabled and selected input sources, and macOS rewrites it whenever you change them. To undo a layout, remove it in Edit… instead of touching the file.
To remove one, select it in the Edit… list and click the remove (−) button, then move the .keylayout file (and its .icns) to the Trash in Finder and log out and back in. To back up your custom layouts, copy the contents of ~/Library/Keyboard Layouts to a safe place. On a new Mac, put the files in the same folder, log out and in, and add them again under Input Sources.
.keylayout and be valid XML. A layout with a broken tag is skipped./Library/Keyboard Layouts needs to be readable by everyone. Files copied there with Finder normally are./Library/Keyboard Layouts, not your home folder. Check both.~/Library is hidden in Finder, and Spotlight and Finder searches leave out files in there and in system folders. A layout you installed two years ago is easy to lose for that reason.
Typing .keylayout into Everywhere lists every layout file on the Mac with its folder, so you can see at a glance whether a copy sits in your Library or the shared one; a copy in Downloads or Documents shows up once Everywhere has Full Disk Access. It matches file names only, so it will not tell you which key produces which character. Press ⌘↵ to reveal a result in Finder.
Copy it into ~/Library/Keyboard Layouts for your account, or /Library/Keyboard Layouts for every user. Log out and back in, then add it in System Settings > Keyboard > Text Input > Edit….
Inside /System/Library/Keyboard Layouts/AppleKeyboardLayouts.bundle, on the protected system volume, in a compiled form rather than .keylayout files. To change one, have Ukelele start a new layout from it and save the copy into your own Keyboard Layouts folder.
Check the file ends in .keylayout, sits in one of the two Keyboard Layouts folders, and that you logged out and back in. In the add list, look under Others. Input methods for Chinese, Japanese and similar go in Input Methods, not Keyboard Layouts.
In ~/Library/Preferences/com.apple.HIToolbox.plist. Change the list from System Settings rather than editing that file.
Everywhere keeps track of every file on your Mac — including the folders Spotlight hides and drives you have unplugged. Free for a day, then $19 once.
Version 2.20.3 · macOS 13+ · 4.7 MB · notarised