
My First Keyboard Build - gurgus
http://www.davecooper.org/blog/2014/10/15/i-built-a-keyboard/
======
zck
If you're interested in soldering together a keyboard, but not having to
design everything from scratch, it's worth checking out the Ergodox:
[http://ergodox.org/](http://ergodox.org/) . I built one a month ago, and I'm
enjoying it a lot. It's a two-piece keyboard with straight key columns, and
six buttons for each thumb. You can order the parts on massdrop, when they
start another order:
[https://www.massdrop.com/buy/ergodox?s=ergodox](https://www.massdrop.com/buy/ergodox?s=ergodox)

It's not perfect, mind you: the thumb islands are three buttons wide, and my
thumb rests on the innermost button. And I have hands larger than average; I
don't know how someone with smaller hands would find the board. Also, because
of the layout changes, some keys (the square braces, enter, - and =) have to
be moved somewhere else; the buttons you're used to pressing just aren't
there.

There are some tiny parts; if you buy it, get a head-mounted magnifier with a
light, like this one: [http://www.amazon.com/SE-MH1047L-Illuminated-
Multipower-Magn...](http://www.amazon.com/SE-MH1047L-Illuminated-Multipower-
Magnifier/dp/B003UCODIA/ref=sr_1_2?ie=UTF8&qid=1413732059&sr=8-2&keywords=soldering+magnifier)
. I don't know how I would've been able to surface-mount the tiny diodes
without it.

Obviously, the downside to having a keyboard with radically different
placements of buttons is that going to other keyboards becomes difficult
again. I haven't solved this problem, but might end up buying a second one for
work.

~~~
ljk
Are you familiar with the Kinesis Advantage keyboards? The keys are also
separated into two sections but sitting on one keyboard, but no DIY needed.

I just started using one recently, but never used ErgoDox before, and wanted
to see if anyone has any experience with using both of them.

~~~
zck
Yes, I tried that for a while, and didn't like it. Here's why:

1\. It has Cherry MX Browns. I like more clickiness.

2\. I found the curved alignment of the keys annoying. The thumb keys also
felt off, but I don't recall how.

3\. The remapping support for Kinesis is far inferior to Ergodox's. When I
talked to tech support, they recommended using macros rather than remapping
keys. This is because switching from Qwerty to Dvorak wipes any key
remappings. Certainly I don't want to risk losing my keyboard layout, so
macros are the way to go. But there's a maximum of 48 macros that can be
stored, so you could only remap 48 keys. That's probably an acceptable limit
if you don't need a bunch of extra macros. However, having a lot of macros
means you might lose keystrokes^1. Compare this to the Ergodox, which lets you
place any key anywhere with no downside other than your memory and ergonomics.
You can also have multiple key layouts, and switch between them easily.

4\. I was trying to switch to the Kinesis while at work, making it more
frustrating when I was slow. I switched to the Ergodox at home, so I had more
time. I also got the Ergodox after I tried the Kinesis, so some of the muscle
memory was already entrenched when I got the Ergodox.

5\. I borrowed the Kinesis, but bought and assembled the Ergodox. This means I
was more invested in liking the Ergodox, whether or not it was actually
better.

[1] [http://www.kinesis-ergo.com/support/technical-
support/faqs-a...](http://www.kinesis-ergo.com/support/technical-support/faqs-
advantage-keyboard/) , the section "How do I switch between the macro memory
configurations of 24, 36, or 48 macros?" states "Fast typists will often lose
keystrokes from certain common words with the 48 macro setting, and very fast
typists may even lose keystrokes using the 36 macro setting."

------
userbinator
_if anyone doing a hand-wired build has a better /more efficient method of
making the cables for the columns, please let me know_

Use self-fluxing enameled wire. It's insulated with an enamel that
melts/converts into flux at soldering temperatures, so all you need to do is
wrap a turn around the post of each switch contact for a column, then add
solder to complete the connection. Some are sold in a convenient pencil-shaped
dispenser
([http://en.wikipedia.org/wiki/Wiring_pencil](http://en.wikipedia.org/wiki/Wiring_pencil)
).

I've always wanted to build a keyboard for fast typing, with ultra-light low-
travel leaf-spring switches that have a more "bouncy" feel. When trying to
type at 160WPM+ it matters far less what kind of sound or tactile feel the
keys produce as you care more about the key actuating immediately when hit and
providing some spring action to help the finger back up afterward. A leaf-
mounted keycap has essentially no sliding friction, which means very little
difference in force required between hitting it obliquely or perpendicularly.

Isn't buying a premade MCU board for a "keyboard from scratch" cheating a
little? I'd go with a deadbugged 8749 in a DIP-40 package, the classic MCU for
a keyboard controller. :-)

~~~
slantyyz
>> 160WPM+

Wow! I am guessing you're not using a QWERTY layout to do that. What layout
are you using? Dvorak?

~~~
userbinator
Actually it is a standard QWERTY keyboard, with rubber dome switches but this
one happens to have a much lower actuation force and distance than most
switches, with a soft, cushion-like springy feel at the bottom. Someone used
to "better quality" keyboards such as mechanical ones would probably find the
keys too loose and wobbly, but I've found that the loose feeling helps when
you just want the keys to go down as quickly as possible, since at those
speeds it's more a process of hitting keys without conscious thought and
hoping they register rather than trying to sense their feedback.

I have tried mechanical keyboards, and for the longest time I used a clicky
one with blue ALPS switches, which has a nice tactile response to the keys,
but was not able to exceed ~130WPM with it - the clicking was actually
distracting and I felt like I was waiting to feel the key switches actuate
before moving on...

(Many of the fastest typists on TypeRacer and one of the well-known, Sean
Wrona, use QWERTY so I don't think it's a big disadvantage in terms of speed.)

~~~
slantyyz
That's interesting - I have an outdated notion that QWERTY was a hindrance to
speed. This was based on stuff I read in the 80s-- this was way back when the
Apple //c came out and offered an option to use either Sholes or Dvorak.

I find your choice of rubber dome very interesting. I learned how to type with
an IBM typewriter, and moved on to the Apple Extended Keyboards in the early
90s. I recently thought I wanted a keyboard with Cherry MX Reds (I found the
clickier MXes too jarring on my fingers), but after years of getting used to
and liking the Apple chiclet keyboards, I found that I just couldn't get used
to the feel of a mechanical keyboard again. I ended up getting a dome keyboard
instead.

~~~
SnacksOnAPlane
QWERTY was designed so consecutive keystrokes are usually on opposite sides of
the keyboard, to prevent jamming on a typewriter. Switching sides often
doesn't actually slow down typing.

------
audunw
If I were to build a keyboard I would definitely take a couple of ideas from
typematrix.

First of all, staggered keys make absolutely no sense(unles it's actually a
typewriter). It takes a week to get used to a straight layout, and it feels
more natural. It's not a problem to switch between staggered and matrix
layouts either.

Second thing I would copy is having enter and backspace between the two halves
of the keyboard. If you touch type this area is unused, and it's less strain
on your pinky finger.

But anyway, this was really a great project, and a nice writeup :)

~~~
inclemnet
> and it feels more natural

I've always wondered about this - I don't disbelieve that some people feel
this way, but is it really a general consensus? And is there a reason we
should expect it, I don't see why staggered keys make fundamentally less
sense.

~~~
sparkie
Staggered keys make less sense because they were designed for the typewriter -
not the human. Ergo keyboards are designed specifically with the human hand in
mind - to reduce finger and hand movement, and place them in comfortable
resting positions.

I would say it is a consensus among people who have used non-staggered layouts
for a sustained period - the benefits are definitely noticeable to someone
with RSI too.

People are satisfied with their keyboard layout because it's good enough for
them, and they've not experienced using other layouts enough to compare the
benefits. It's very much like PGs "blub paradox", in which the a typist
becomes familiar enough with his keyboard that other, allegedly better
keyboards seem like only minor improvements - not worth the effort to switch.
For most people, this is probably the case - it's only if you're typing for
several hours a day that there will be tangible benefits to hand-optimized
layouts.

~~~
inclemnet
> Staggered keys make less sense because they were designed for the typewriter
> - not the human

Even if this is true, it only demonstrates that the original reason for
staggered keys is no longer a factor, not that staggered keys are actually
worse for humans.

The rest of your post brings up the same questions as the other reply. Even if
straight layouts are superior (I'm willing to believe it), by _how much_ , and
what about other factors? A typematrix rigidly-square layout is quite
different to (for instance) the semi-straight layout of the TECK keyboard
marketed as 'truly ergonomic'. In a sense, this layout isn't even different to
staggered keys - staggered rows can be relatively straight if your wrists are
angled. I suggest this partly in principle - I do agree that the standard
angling of a staggered keyboard is not ideal.

------
moron4hire
Excellent build quality, but I was surprised by these two statements on things
you need:

    
    
        A decent soldering iron. You will thank yourself later. Also note: you will burn yourself many times throughout the build. Might as well do it with a fancy iron!
        LEADED SOLDER – I started the build without leaded solder and oh dear…
    

If you have a "decent soldering iron", then lead-free solder shouldn't be a
problem. Also, if you live in the EU, leaded solder will be extremely
difficult to come by.

Well, even with a really crappy iron, as long as the tip is fresh, you
shouldn't have a problem. Most people's problems with soldering come from not
having the tip wet enough and not using enough solder, thereby not making
enough contact with the wire and not putting heat into it fast enough to get
that specific location hot before the heat conducts away into the rest of the
wire.

Remember, the entire reason we're using the wire is because it's an excellent
conductor. For that reason, thicker gauge wire is also going to be more
difficult to work. And the only reason to use larger gauges of wire is to
support more current. Keyboards run on extremely little current already. You
probably could have done this with magnet wire and been fine (though I
wouldn't recommend it, magnet wire is difficult to work for different
reasons).

So crank up the heat. Get it into the wire as fast as possible. Lead-free
solder generally needs higher heat than leaded solder anyway. Apply the
solder, apply the wire, then wait a second before removing the iron, because
you also have to heat the wire you're pushing in. Soldering is a chemical
bond, the metals physically mix, and you need to get them up to the right heat
to do that.

And keep it steady, any movement while it is cooling will create
microfractures in the solder joint.

~~~
gurgus
Thanks for the tips!

I found it very difficult to do the soldering due to an extremely unsteady
hand and not a whole lot of experience. I 100% agree with everything you're
saying though - I just ran with what I thought worked.

~~~
michaelt
It looks, in the photos, like you were trying to solder together two diode
leads in mid-air.

The trick to soldering when you have unsteady hands is to set things up so if
you press harder the two things being soldered make better contact, instead of
being pushed apart. That way you can rest the tip of the iron on the
workpiece.

Soldering leads together in the air can be a right pain, because you can't
press on hard without them moving apart. You can usually find tricks to avoid
it though - like putting an old PCB and some packing material below the joint,
so you have something to push against, and twisting the leads together so they
can't move apart as easily.

------
coryking
This is quite an inspiring article, thanks!

Your photography could be improved if you got a white sheet of paper or maybe
some posterboard (eg: [http://www.dickblick.com/products/blick-economy-white-
poster...](http://www.dickblick.com/products/blick-economy-white-
posterboard/)). Put that under and behind whatever you are taking a picture of
and it will make a more neutral, less busy background. If you want to get more
complicated, get a tripod.

A good guide for taking your kind of photos is here:
[https://www.ifixit.com/Guide/How+To+Take+Amazing+Photos/718](https://www.ifixit.com/Guide/How+To+Take+Amazing+Photos/718)

Lastly, make sure to have a link to higher resolution pictures :-)

Cheers!

------
melling
Has anyone built a DataHand or something else that "reinvents" the keyboard?
This is already two decades old.

[http://en.m.wikipedia.org/wiki/DataHand](http://en.m.wikipedia.org/wiki/DataHand)

~~~
sparkie
There's an ongoing effort by someone to recreate it:
[http://geekhack.org/index.php?topic=41422.0](http://geekhack.org/index.php?topic=41422.0)

~~~
melling
Seems to be going slowly. This would be a great Kickstarter project. I'd buy
one. Wonder how to gauge the actual Kickstarter interest before putting in the
effort?

------
pistle
OP. Consider using "spindly" or "strength-neglected" instead of "girly" arms
when describing your weakness. Plenty of women have strong arms.

You did a decent job of being inclusive except for that spot. Nice work on the
keyboard and article.

------
pcl
With a diode matrix, is it possible to distinguish multiple simultaneous key
presses? And if not, how do you handle modifier keys? Looking at your photo,
it would seem that they're wired into the matrix in the same fashion as the
rest of the keys.

~~~
wyager
Yes, you can detect an arbitrary number of simultaneous keypresses. The only
limitation is that you can only scan one of the dimensions in parallel.

------
thisjepisje
Now make a dictaphone :P

For real though, here's another guy who makes keyboards:

[http://mykeyboard.co.uk/microswitch/](http://mykeyboard.co.uk/microswitch/)

They're a bit weirder and with very light switches.

~~~
gurgus
Wow those are some crazy keyboards!

------
michaelbuddy
I wasn't necessarily expecting the parts for a keyboard build to be cheaper
than an already assembled mechanical but that Gons site is selling keyboard
kits for $470 !? That seems really high to me. I'm not even sure if that price
includes everything you need to build on. I'm wondering how normal that is for
this kind of thing or if you're kind of buying support along with the price,
which would make it worth it I guess.

------
TheLoneWolfling
Current keyboard designs bug me, to put it mildly.

Put a mux on each group of switches, have the microcontroller rapidly scan the
muxes to determine which switches are down.

And now all of a sudden you have a keyboard that you can actually press down
as many keys as you need and it still works. Except it won't. Because USB
keyboards don't support arbitrary numbers of keys being pressed at once.

~~~
idbfs
"Because USB keyboards don't support arbitrary numbers of keys being pressed
at once."

There is actually nothing in the USB or HID specifications preventing USB
keyboards from supporting n-key rollover (when using the report protocol --
keyboards using the boot protocol are limited to a 6-key rollover). The reason
most don't is simply to reduce cost and complexity. A sufficiently motivated
person could build a USB-compliant keyboard that supported an arbitrary number
of simultaneoue keypresses, and some do (e.g. [http://www.maxkeyboard.com/max-
keyboard-nighthawk-x9-red-bac...](http://www.maxkeyboard.com/max-keyboard-
nighthawk-x9-red-backlit-mechanical-keyboard.html)).

~~~
TheLoneWolfling
Unfortunately, specifications are great, but in actuality you have to take a
look at what is _implemented_ as opposed to what is _supposed_ to be
implemented.

In particular, if you try to go over 6-key rollover, good luck. You end up
having to, and I'm not making this up, emulate a USB hub connected to multiple
keyboards. It's _absurd_. And all because of the following:

"However, the compatibility version of HID that all present systems implement
limits USB keyboards to reporting a mere six regular keys together with four
modifiers. Additional keys pressed beyond the limit will generally cause some
of the other keys to be dropped."
[[http://deskthority.net/wiki/Rollover,_blocking_and_ghosting#...](http://deskthority.net/wiki/Rollover,_blocking_and_ghosting#Interface-
limited_NKRO)]

"non-working n-key rollover with a USB connection is a side effect of the data
packet."
[[http://geekhack.org/index.php?topic=5572.msg85020#msg85020](http://geekhack.org/index.php?topic=5572.msg85020#msg85020)]

(Effectively, instead of doing make:key / break:key packets, the compatibility
version of HID does current_keys_pressed:[array of 6 keys]. Why they didn't
stick with the make/break of the PS/2 protocol is beyond me.)

------
zokier
Probably one of the first projects I'll make once I get my electronics
workspace set up is a small keyboard based on TL1240 switches.

Like OP, I have found the state of free CAD software bit disappointing, moreso
for libre ones. So far my favorite has been the free 2D version of SolidEdge,
but it has its quirks and like the name implies it doesn't do 3D at all.

------
robryk
I think that it'd be feasible to "teach" the firmware assignment of pins to
rows/columns by pressing the keys in sequence upon first startup. You could
probably even get away with pressing every key in any order in the "teaching"
step if you installed some precisely chosen diodes in reverse.

------
rdc12
I think this pretty cool, but I can't really see why you would be so
conventional in a custom keyboard. I would end up remaking the space cadet or
something similar I bet. I assume a modern linux install can handle the extra
modifier keys

------
crististm
That's a nice hack. Gives me motivation to build a custom Emacs keyboard
myself.

~~~
gurgus
Thanks! As I'll tell everyone, just go for it. It takes some time/effort but
is such a fun thing to do.

------
DanBC
About the column wiring: You can buy ptfe sleeving and single core uninsulated
wire. PTFE won't melt. Here's one example, it comes in a bunch of sizes and
usually in 5 m lengths.

Really great write-up btw!

~~~
VLM
I'd extend the insulation remark that the cognitive load should be spread. So
a hundred identical simple diodes should have insulation slipped on all of
them and then the somewhat more cognitively challenging job of individual
column wiring can just be bare wire.

Another suggestion is I've never built a keyboard but I've done weird LED
arrays and one trick to pre bend all the leads the same way, involves a chunk
of scrap wood and a bunch of nails (and maybe multiple forming steps/bending
jigs). Much like a sheet metal worker, you'll rapidly discover the leads will
spring back a little and you'll have to bend them to 100 degrees if you want a
right angle. Its just scrap wood and nails, so play around a bit. You can do
it by hand but a bunch of nails in a block of wood works better and is faster
overall.

You were worried a bit about getting the diode polarity backwards. You have
the source and you'd basically be inverting the bits you're polling with, see
the gh60/matrix.c code. The system depends on the internal pull ups so you'd
want to not enable the internal pull ups and solder in a couple external pull
downs like 1K or so. Just saying it would be survivable and more fun than
redoing all those diodes not that its necessarily a good idea.

(edited to add, on your next build, if you want to try something really
strange, wire up all the "rows" with 500 or so ohm resistors making a massive
resistor divider such that the pin in the middle is at 2.5 volts and 0 and 5
volts at the ends, and then wire up the other pins in parallel. So you hit the
1st of 10 and get an analog voltage of 0.5 volts, hit the 5th of 10 and the
analogy voltage of 2.5 volts (for 5V anyway) and have the stereotypical
onboard A/D microcontroller input sample it. Some MC are not very high res or
stable. I imagine this would be an interesting key debouncing challenge
involving painful latency, but it would be cool in an insane way)

~~~
gurgus
Wow awesome ideas! Also thanks for the bending ideas too - it would definitely
help make things much easier on the eye too!

------
lifeisstillgood
A witty and self-deprecating write up of a first dive into hobby hardware -
and a great result.

I would also check out plover - steganography for the masses.

Excellent - keep it up!

~~~
blalabro
I think it is actually the opposite to self deprecating. The tone is the
equivalent of an "ipsum lorem". He just wants you to focus in the big picture.

------
ghammy
Dave Cooper as seen in Se110 and UCP120? Awesome build and write up mate! Very
inspiring! :)

~~~
mercluke
nah, it's not curtin dave. It's ECU dave

------
mohamedattahri
Reminds me of a beautiful quote: "If you want to make an apple pie from
scratch, you have to first build the universe."

~~~
gurgus
Haha, I like it!

------
kfihihc
Cool.

I also building my own GH60 keyboard.

~~~
gurgus
Nice man. Definitely go for it.

It took a fair amount of effort to build mine, but it was (and still is) such
a rewarding feeling to have finished a project like this. If you have any
questions or just want to bounce some ideas please feel free to give me a
buzz. I'm always interested in other peoples DIY projects :)

------
leoc
'Tis pity. There's really no reason to go to all this effort and expense and
not split the spacebar into left and right buttons, not add any other
thumbable modifier keys, and worst, include neither a pointing stick nor a
thumbable trackpad.

~~~
gurgus
Hah, it's still early days man! This is the first build of many to come. As I
stated in the blog post, this build was just to see if I was capable of doing
it since most of the skills I didn't possess before starting the build. Now
that I know how to do this sort of stuff I'm definitely going to be exploring
all the things I can do in the future.

