There are three things in life that I always tried to find the best: a mattress, a pair of shoes, and a keyboard. I’m not saying that I always buy the most expensive, but I always try to find the best fit for myself. For a mattress, it’s because if you spend one third of a day on it, you’d certainly want to sleep on something that does not give you backache in the morning. As for the pair of shoes, you’d probably spend half of your day walking in it, you’d certainly want something very comfortable, something that would not make your gait faulty and thus harm your health. And for a programmer, a keyboard is one of the major tools, if not the tool, to get our work done. A bad keyboard is a source of repetitive strain on your hands and can make your life miserable.
Like all programmers, I have owned many keyboards, some of them cheap, a lot of them quite expensive. Besides the many many keyboards that came with a computer and laptop, I have owned two of the Microsoft “natural” ergonomic keyboards, a HHKB II Pro, two mechanical ten-less-key keyboards, an old keyboard that came with the IBM 3151 terminal (very nice to type on), a Goldtouch 02 split keyboard, an Ergodox, and many more. But there’s always something missing, something that would make me fully happy. So I decide to create my own, and here is my DIY Key58 keyboard.
The Ergodox is quite good, but the thumb cluster is a bit difficult to harness. I also love the Key64, but it relies heavily on the pinkies for the modifier keys. I also love the Keyboardio, but it will have to wait until at least next April, and not only is it expensive (although I still want to order one!), the key map shows that the designer obviously did not have programmers in mind. So, I borrowed ideas from these keyboards that I like to create my own.
The main goals of the new keyboard would be:
- It should be optimized for programming, and the most frequently used programming symbols should be easy to access. For this, I borrowed from Key64.
- It should be optimized for Emacs and Linux, as this is the main environment I work in. Therefore, the modifier keys should be very accessible, and the Emacs key combination should be easy to type. For this, I borrowed from Ergodox and Keyboardio.
- Navigation keys should be accessible without moving away from the home row. As much as I can customize my Emacs, there are many applications that do not provide any way of customizations, and the normal navigation keys are still a must. For this, I borrowed from Ergodox and Key64.
- It should minimize stretching your fingers side-way, be it your index or your pinky, as this is the source of repetitive strain injury. Even though it is impossible to eliminate it completely, we should minimize it as much as we can.
- Your arms and shoulders should be in a relaxed position when you are typing. All fingers should be relaxed, with roughly the same bending angle.
With these goals in mind, I set out to design my own keyboard. I tried many key arrangements, with different angles, until I find one that I think would be best for me.
The final layout and keymap look like this:
Note that this arrangement might not be optimal for others, but it is pretty optimal for me, due to the size and length of my fingers. Also, the diagram above does not show the angle of the key layout, see the laser-cut plate below.
The Launch key (at right bottom) is a key to launch application. I always have to key that is bound to bring up gmrun to start applications. So that is the purpose of this Launch key. On the upper right corner, there’s a Lambda key. This is not used for now, but it is intended to be used as programmable shortcut key. I’ll need to figure out how to do that in the firmware. Other keys are just normal stuff.
With that, I used OpenSCAD to design a key holder plate and a bottom plate, and have them laser-cut on 2mm 304-steel, as this is the most commonly found on the market. Originally, my plan was to 3D-print them, but since I don’t have a 3D printer, I got quotes from five or six 3D printing service providers, and the price quotes were ridiculous. Hence the laser-cut steel plates.
The key holder plate and the bottom plate, together, are quite heavy. I’m sure the keyboard could be used as a handy weapon. If someone were hit on the head with it, I’m sure he would have some serious concussion, if not killed on the spot
Once the plates came in, it’s time to hand-wire it. Here are some pictures of the wiring and soldering work:
Yeah I know, the wire and solder joints are quite ugly. With my reduced eyesight (I can barely see the pin on the mechanical switch without a magnifier glass) and hands not as sturdy as they used to be any more, it is impossible to ask for beautiful solder work.
For those with sharp eyes, you’d probably have noticed that the key holder plate is missing a screw hole. That’s right, the guy at the steel shop had managed to forget one hole. I don’t know how, as this was supposed to be handled all by computer and steel-cutting machinery, but he really did. However, since this was a job ordered online, I didn’t feel bothered enough to send the plates back for this little imperfection.
Even though I don’t play game at all, I still prefer the red switch as it offers the least resistance, and it is very comfortable to touch type on. Therefore, I had Cherry MX Red for every key. The key caps are just normal non-brand-name, cheap plastic key caps, although they are thicker than the normal ones. They are comfortable to type on, but nothing fancy.
And the final result looks like this:
And from the top:
Ok, it is not exactly beautiful, but it feels great to type on. So, function over form for now.
I used the Teensy 2.0 for controller, to take advantage of existing works for the firmware, which is based on the tmk_keyboard, with my own small modification. Source codes are available here. Only two layers of layout are implemented at this point, but I intend to add more layers as I fine-tune it to my likings. Maybe a mouse key layer will be added in the near future, by activating the Fn3 key.
After a few days of practice typing, I kind of like it, a lot. I’m typing this blog with this keyboard now. I have not done any scientific measurement on the movement of my fingers, but my pinkies are definitely less busy, and feel a lot less stressed.
However, it is, in no way, perfect. There are still a lot of room for improvement, especially regarding the layout. First of all, the modifier keys under the thumbs should be moved up by 4 to 5 mm, closer to the keys on the fourth row. That would make the size of keyboard a tiny bit smaller, but I feel it would be significantly more comfortable. Worried that the keys might be too close to each other and it would be hard to pull the key cap, I added an extra one millimeter in the distance between the keys, in the last minute, just before sending the plate diagram to the steel shop for laser cut. That was a bad mistake, as the one millimeter added up quickly, and that makes the first row a bit too far too reach. And thinking about it, I found that I almost never pull the key caps, unless for doing some special clean up. Therefore, the cost of that one millimeter is immeasurable.
As you can see, the layout is still not optimal, even though it is designed with the size of my hands in mind. There are four keys that are still hard to reach without moving my hands, namely, the Esc, 5, 6, and the Lambda key on the top right. I don’t really care about the Esc key, I’m not a Vi person. The Lambda key is not used yet, so I’m not sure how often it will be hit in the future. But the 5 and 6 keys need a bit of stretching. However, they are still closer to the home row than the same keys on a normal keyboard.
I’m not also very satisfied with the two Fn0 and Fn1 keys. Even though I put them in between two modifier keys, and even though I used an R2 cap, which is already the lowest cap, I can always feel its presence there, under my palm. I see that Keyboardio used a special cap that is sinking a bit lower than other keys, although I have not been able to try on one yet, I have a feeling that it would solve my problem here. To be frank, I have not hit the Fn key by accident yet, so far, but that constant presence keeps reminding me that I need to avoid it when they are not needed.
There is still something not exactly right with the layout of the four rows. I am not sure what, I can’t put my fingers on it (no punch intended), but it just doesn’t feel perfectly satisfied. Probably I’ll figure out after using it for some more time.
Before we go on to another problem, let’s just say that one thing I’m really happy with, is that my pinky and index, on both hands, need not do side-way stretching very much. If you are confused about what I’m saying here, try this on a normal keyboard. Place your fingers on the home row, and try to hit ‘`’, Tab, Left Shift, ‘B’, ‘Y’, Right Shift, ‘\’, Backspace, Enter, etc, without moving your hand from the home row. Your indexes and pinkies would need to stretch side-way significantly to reach them, and these are the keys we hit many many times on a daily basis. With this new keyboard, my fingers need to stretch a lot less. And that’s a very good thing.
Let’s get back to the problem. Another lesson learned was that, it’s probably easier to design a PCB board and save the work on hand wiring, and that would make the keyboard cleaner too. I would definitely work on a PCB for next one. Using the Ergodox PCB as a base and add my own modification on it would be something not too difficult to handle. Another possible modification would be to make it a split keyboard. A split keyboard would allow us to reduce the angle of the key layout, and hence, significantly reduce the size of the keyboard. It would be really messy to hand-wire a split keyboard, and that’s why I didn’t do it for this one. Well, a next version then. I’m still looking for my perfect keyboard.