Creating the keyboard layout file
I too used Ukelele to generate a keyboard layout. You can then export the .bundle
or .keylayout
file and copy it to /Library/Keyboard Layouts
.
sudo cp KeyboardLayout.keylayout /Library/Keyboard\ Layouts/
If you want to have the icon for the keyboard bundled in one file Ukelele offers an export to Bundle option. So in this case copy the .bundle
file instead. Alternatively, you can keep the icons separate and copy them with the same name to the same folder.
sudo cp KeyboardLayout.icns /Library/Keyboard\ Layouts/
After a reboot you can add the input source in System Preferences->Keyboard->Input Sources menu. Probably available under Others or the language if you attached a language to the keyboard in Ukelele.
How to create an .icns file
mkdir layout.iconset
Then add the following PNGs to the folder:
# All sizes necessary
icon_16x16.png
[email protected]
icon_32x32.png
[email protected]
icon_128x128.png
[email protected]
icon_256x256.png
[email protected]
icon_512x512.png
[email protected]
You don't need all these, but this is the official list. Some are redundant in pixel count, but indicate density.
iconutil --convert icns --output layout.icns layout.iconset/
Example project on GitHub
My Ukrainian-Russian project on GitHub is a demo that is currently working on Mavericks 10.9.5.