Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I wonder how to edit the following two files, so that I can change the system keyboard layout. It seems they are binary resource files, but I'm not sure.

/System/Library/Keyboard\ Layouts/AppleKeyboardLayouts.bundle/Contents/Resources/AppleKeyboardLayouts-B.dat

/System/Library/Keyboard\ Layouts/AppleKeyboardLayouts.bundle/Contents/Resources/AppleKeyboardLayouts-L.dat

I could use Ukelele to create a custom layout, but I would like to know how Ukelele reads the current layouts, and more over whether it is posible to edit the system layout directly.

share|improve this question

3 Answers 3

up vote 1 down vote accepted

As far as I know, nobody has found a way to edit the system layouts directly. Making a custom layout via Ukelele is the way to go.

share|improve this answer

Although I prefer to just make my own maps, it seems that a lot of the files for the default keyboards are stored in /opt/X11/share/X11/xkb/keymap

share|improve this answer

I have been able to customise a flag without using Ukelele.

I have just extracted all the flags icns with this script : github.com/phible/scripts

Then, locate the icns in the AppleKeyboardLayouts-L.dat file comparing with the beginning and the end of the hexa code of the .icns, delete the code and replace it with the one of my customised icns. Log out of user session, log back in, done ;)

Here is the result with my black theme :

http://cl.ly/image/2o140J0t3M3y

http://cl.ly/image/2R3c1T1j0J1o

I highly recommend to use Icon Composer 2x to create the new .ICNS before integrating it into the .DAT. See here :

apple.stackexchange.com/questions/59561/where-did-icon-composer-go-from-xcode

WARNING : DO NOT EVER DELETE THE .DAT IN THE KEYBOARD BUNDLE, ALWAYS OVERWRITE IT, OTHERWISE YOU KEYBOARD WILL BE STUCK AND YOU WONT BE ABLE TO DO ANYTHING ! (ALWAYS KEEP A BOOTABLE MAC OS X INSTALLER IN SENSITIVE CASES LIKE THIS TO REPAIR THINGS REINSTALLING MAC OS X ENTIRELY OR JUST FIX IT WITH TERMINAL)

share|improve this answer

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

    
Your answer needs to stad on its own; links are helpful, but we want the answers here to work even if the linked document goes away. –  Daniel Lawson Aug 23 at 3:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.