Nimitz Alive!

Mechanical keyboards. I love mechanical keyboards. I’ve owned several in the past, but between moves and an admitted amount of fickleness, I haven’t had one for about a decade. Now, that’s changed. I’m writing this on an Apple Extended Keyboard II. It’s stock, and is connected to my iMac via a homebuilt USB adapter.


In the run-up to reintroducing a mechanical keyboard to my setup, I did plenty of research, and I looked back on my past experiences with both the IBM Model M and the Apple Extended Keyboard II. I considered new mechanicals made by WASD (both the stock v2 and Jeff Atwood’s CODE) and Unicomp. I quickly came to the realization that the Model M and the CODE were right out. The Model M because of its 101-key layout. I didn’t want to have to do too much training to figure out where and how I’d fit in an affordance for the Option key, and the CODE, while ostensibly supporting a Mac layout via DIP switches, felt a little bit like capitulating to a default-Windows-world. I quite like the WASD v2 with the available Mac layout (and I encourage you to play with their online keyboard designer. Colored keycaps! Fonts! Layouts!), but the price was a bit off-putting. I looked (very) briefly at the Unicomp, and quickly closed my browser tab. The aesthetics left more than a little to be desired. So I found myself back in the 90’s, looking for an Apple Extended Keyboard II. After reading an article about making your own USB adapter for the AEKII, the bug was planted, and the deal was sealed.

Start scouting eBay, and you’re bound to find some in good-enough condition. When looking at AEKIIs, you’ll discover that although all are Family Number M3501, some were manufactured in Japan, with Mitsumi key switches, while those made in the US and elsewhere had Alps key switches. Among aficionados, the Mitsumi switches are inferior to the Alps. You can verify the presence of Alps by checking place of manufacture, or by checking the serial number. All Alps key switch keyboards will have a serial number ending in M0312. You can find more gory details here


I found one seller with four separate listings, each at a decent price, bundled with a counterpart Apple one-button mouse. I asked whether he’d consider a discount if I unbundled the mouse or bought multiple keyboards. He wrote back and gave me a decent discount on all four keyboards, minus mice, with free shipping: $112. Done. I had the keyboards, but no cables. My options were to follow ScottV’s lead (internalize the adapter and use a USB cable) or find an ADB cable. I opted for the latter with an external adapter for three main reasons:

  1. I had three backup keyboards, which meant there would be a lot of work to fix or swap components from a stock keyboard to a modified keyboard.
  2. There isn’t a whole lot of space inside the keyboard case, and I don’t have that much experience with soldering and small electronics to feel comfortable working in an environment that cramped.
  3. That original coiled ADB cable! Turns out, you can also get standalone cables on eBay. I found two in good shape–one was NOS (New Old Stock), for about $5 each.

Going external, however, meant that I needed something to plug the cable into. ADB is basically just branded S-Video, so let’s go back to eBay and get some S-Video connectors. 10 for $5? Done.

Getting it all together means you’ll need a microcontroller. I went with the Teensy 2.0 board, since that’s what ScottV used. There are also Arduino boards that will work. You can check Hasu’s github for more information. I ordered two, just to be on the safe side.

Compiling Hasu’s code is simple enough, but you’ll want to install CrossPack by Objective Development. It provides the tools necessary to compile the firmware. You can find them elsewhere, but ObDev puts it in one easy package. You’ll also need the Teensy Loader application from PJRCs site to get the compiled firmware onto the Teensy device.

I had some generic USB mini cables lying around from various other peripherals, and I’ve been building up a small stock of soldering gear in preparation for other projects with Lex (maybe we’ll write about those later). So, the rough final cost for my keyboard:

  • Apple Extended Keyboard II: $28
  • Apple ADB keyboard cable: $5
  • Teensy 2.0: $16
  • S-Video connector: $0.50
  • Random soldering components: $chickenfeed

For $50 and an hour’s work, I’m clackety-clacking away on a beautiful piece of hardware, and I have three backup units, in case anything goes wrong.

Wiring up the Teensy

1K Ohm pull-up resistor between power and data

S-Video connector

S-Video connector soldered

That original ADB cable!

Hard at work

Future modifications

  • Provide a housing for the adapter. Mini Altoids tin (Alpstoids?)
  • Apply retr0bright to the keyboard cases and space bars to remove the yellowing and return them to their platinum best. Should probably wait until Spring for plenty of natural daylight UV.
  • Get Caps Lock as Control. This will involve removing the physical lock on the Alps switch under the Caps Lock key, and modifying the Teensy firmware to treat the Caps Lock key as a momentary key. After that, OS X will handle the translation for me. Done!
  • Bluetooth! A wonderfully thorough writeup of a project to convert an IBM Model M to a Bluetooth wireless keyboard.


This was a fun project that has only just started me down the road of hardware hacking. I’m looking forward to future fun with Lex and a Raspberry Pi that he might be getting for Christmas (shhh, don’t tell).

If you find yourself getting the mechanical keyboard bug, you’ll do well to spend some time reading through the GeekHack and Deskthority sites. Very friendly, helpful people all firmly in the mechanical keyboard camp.

Followups Sidebar

Surely,” I thought, there already exists an sidebar for Octopress.”

[Edit: Well, there is, officially.]

Well, there is, sorta. But She’s a Girl posted about her work at getting it integrated with her site, but its artifacts are mostly bound up in the commit messages for her blog. Additionally, there’s no longer a real need to offload the fetching of your content to cron, you can get perfectly serviceable JSON directly from’s API. So, I opted to tweak it, the results of which you can see in my sidebar.

I reached out to the Octopress folks and learned that a future update will include better ways to bundle new functionality and templates together, but for now, I’ve uploaded my start at an sidebar for Octopress.

[Edit 1/14/2014: Since I’ve migrated the blog to Pelican, and no longer use the sidebar, I’ve removed the previous code snippets, but the repo still exists on Github.]

Buy My Bag: 2013

It’s that time again. Time for you to buy my bag. I’ve got a 2011 Tom Bihn Ristretto for 13″ MacBook Pro (same structure as their Original Style Ristretto, but larger). It’s Cocoa with Cayenne interior, and it has the Absolute Shoulder Strap. It’s in fabulous condition, and it really, really wants to live at your house. One solitary Benjamin is all that separates you from this beautiful bag.

Tom Bihn Ristretto

Tom Bihn Ristretto

Zem 0.9.9

ExternalEditor: Because no one should have to use <textarea>”

Long ago, Casey Duncan wrote a Zope 2 product called ExternalEditor. It let users of Linux and Windows designate local apps to edit Zope-hosted content. As a budding OS X developer, and a user of Zope, I ported it to OS X using the PyObjC framework and called it ZopeEditManager. Periodically, as OS X versions came along, ZopeEditManager needed to be patched and resuscitated.

As it happens, I’m now doing some contract work with Zope, and found it needed another update for Mountain Lion, so I’ve rolled out another version. And since it doesn’t seem to be on the Zope Foundation list of a million GitHub repositories, I’ll be hosting it again under my Orangutango repositories.