Saturday, November 14, 2009

How to Convert Old .rsrc Keyboard Layouts

Originally Mac keyboard layouts came in the form of .rsrc files. Unfortunately these sometimes no longer work in the latest versions of OS X, or don't work for all apps. Thanks to info on the Ukelele site, I've located a way to convert these to the newer .keylayout format.

Download and install the Apple Font Tool package from here. Then put your old .rsrc keyboard file in your Home directory, open Terminal, and type

klkchrtoxml name.rsrc

If all goes well, you should find a new file, name.rsrc.keylayout, in your Home directory. There will also be an .icns file if your old layout had an icon in it. If that command doesn't work, you can also try

kluchrtoxml name.rsrc

10 comments:

marcpotvin said...

Hi,

Sorry for my ignorance.... but what is the "Home directory" ??

I've downloaded the Apple Font tools and I have my rsrc file I'd like to convert.

I have an old rsrc "French Canadian" keyboard layout I'm desperately trying to convert for use in OS 10.6.2.

Thanks.

Marc P.

Tom Gewecke said...

You get to Home by doing Finder > Go > Home. It also is the same as users/username. But first please see whether this article doesn't solve your problem:

http://m10lmac.blogspot.com/2009/11/three-keyboards-for-canadian-french.html

marcpotvin said...

Thanks, I actually figured out where my "home directory" was before reading your reply, applied the procedure and it worked. I now realize that your "CanadianFrench" keylayout file on your "iDisk" is the one I was looking for, but before finding it, I've succeeded in converting my old one which is the same. Now I have two versions of the keyboard layout I was looking for !

Merci ! !

Marc P.

Zen said...

What do you do with the converted file? Placing it in
/library/keyboard layout or ~/library keyboard layout did not work. The converted file stored in the Home folder was name.keylayout.

Zen

Tom Gewecke said...

Zen -- did you logout/login after putting the .keylayout file into library/keyboard layouts? Then check its box in system prefs/language & text/input sources? What kind of layout were you converting?

Zen said...

I logged out/in but nothing changed. The .keylayout file is in all the library folders but the name of the keyboard does not appear in the preferences/languages/input menu.

Zen

Tom Gewecke said...

Zen -- I asked you already, what is it you are trying to convert exactly? Send me a copy (tom at bluesky dot org).

D.C. said...

Thanks for this post. I use a modified dvorak layout with a custom icon I created in the nineties. This is the second time I've had to convert it with OS changes. When I switched to OS X years ago it needed to be converted to a .rsrc file, now this change to .keylayout for 10.6.

The command line tool worked perfectly, including making the .icns file. Note that choosing custom install and only installing the keyboard tools worked fine without installing the framework file or anything else. This made it easy to uninstall afterword since there were only three commands to remove from usr/bin. I found Apple's PDF documentation for the font tool suite to verify which files were installed.

Vlad Morosan said...

Hi,
Having just moved to Snow Leopard, I'm trying to convert my old .rsrc keyboard layouts to the new .keylayout format. I just read the discussion above and tried the klkchrtoxml and kluchrtoxml commands. In return, Terminal gave me the following werror messages:

klkchrtoxml morosan.rsrc
The file morosan.rsrc contains no KCHR resources, exiting

klkchrtoxml MorosanTranslitG.rsrc
unable to open res file MorosanTranslitG.rsrc

kluchrtoxml resfilename
unable to open res file MorosanTranslitG.rsrc

Can you please offer any suggestions on how to proceed? I also downloaded and played with Ukelele, but it does not appear to recognize the Morosan.rscs and MorosanTranslitG.rsrc as openable files.

Many thanks in advance.

Vlad Morosan

Tom Gewecke said...

Vlad -- Those commands are the only things that might work, and if they don't, I can only suggest that you rebuild your layouts in Ukelele from scratch. It is very simple to use.