13

As I understand, you can place custom keyboard layouts in /Library/Keyboard Layouts and ~/Library/Keyboard Layouts/ in macOS, and they pop-up in the "Keyboard" section of Settings.

I want to observe, read, and edit one of the default keyboard layouts (Dvorak-Cmd-Qwerty). I expect it to be an XML file. Where is it located?

TL;DR: Where are default macOS keyboard layouts located?

1 Answers1

8

I'd recommend using Ukelele for this. It is free, fully documented, and won't screw up your original layouts.

Keyboard layouts are not in simple XML files; they're in bundles, and the default layouts are all together in one .bundle file in /System/Library/Keyboard Layouts/AppleKeyboardLayouts.bundle which SIP will not allow you to touch on macOS v11 (Big Sur) or later.

Custom layouts are, indeed in ~/Library/Keyboard Layouts, and that is where Ukelele will put your edited layouts.

Tetsujin
  • 50,917