Really Real Compose Key on Mac OS X with Sun Type 6 Keyboard

I use a Sun Type 6 UNIX keyboard. I have used Sun keyboards for decades.  I really like them.  You can get one here or on ebay pretty cheaply:

I also like to type actual characters out like ½¾⅚⅞, ©, ñ, and so on without it taking any longer than necessary.  I use fractions often.  Fractions are sometimes more accurate than decimal, after all.

UNIX system keyboards have a Compose Key which allows you to compose a composite character by typing out its individual components. For example, copyright symbol is Command O C which types ©, a C inside of an O.  Trademark is Compose t m and types ™.  In fact, this behavior is defined in ISO-7000-2021 and is a core feature of Unicode.  The Unicode character for Compose is 0x10...which kind of implies its really important being such a low number.

Windows and Mac have never supported Compose or anything quite like it.  Mac does support Dead Keys, at least.  Weird combinations of keys mostly unrelated to the outcome which produce some third character for no obvious reason.  Windows makes you hold Alt and then enter the Unicode numeric value; a so-called Alt Code.  Awesome user interface, Microsoft.  UNIX Systems have supported Compose for decades as part of Unicode; Linux included, of course.

As such, UNIX computer systems made by companies like Falco and Sun and DEC included a Compose key right on the keyboard so, you know, you can type the entire alphabet from the keyboard.  Nifty!

Its been bugging me for ages that I can't do this on Mac OS X.  I can use the Option key to access many odd symbols like the old "closed apple"  from my childhood which is tremendously important on a Mac, apparently.  

So, there is a way to enable this quite easily.  Once you have the correct information.  Cocoa KeyBindings in OS X are lingering seemingly like a vestigial limb but have an absolutely awesome script-like language!  Bob Kȧres wrote a script called osxcompose which dumps X11 (UNIX) keymap files to a Cocoa KeyBindings dictionary file.  If you would like the gritty details "sam" at LOL Engine posted detailed OS X Real Compose Key instructions to his blog.  I have simply followed those instructions and created a file which implements a really real Compose Key as Cocoa KeyBindings.  They map Compose to F13 because the Mac OS X keyboard is missing a Compose Key.  I have a real Compose key and it now works!

To enable a Sun Type 6 to have a real Compose key on OS X simply create a folder in your Library folder called KeyBindings (~/Library/KeyBindings/ is the UNIX folder name) and drop in my Sun Type 6 OS X DefaultKeyBindings.dict file.

Logout/login and now when you hit Compose 1 2 you get ½.

I will likely update this file later on. The Type 6 has a lot more keys and the key bindings currently only fixes a single key.

I was amused to find that out of all the UNIX keys OS X doesn't support the Help key works.  Pressing Help turns the mouse cursor into a ? and opens help for the next object you click.  Sweet!  One less key to map.