top | item 37220604

A complete guide to building a hand-wired keyboard (2020)

98 points| bfm | 2 years ago |crackedthecode.co | reply

73 comments

order
[+] onetimeuse92304|2 years ago|reply
As an amateur EE, here my thoughts.

If you can do CAD you can probably also design a PCB with a socket for some kind of general purpose MCU or even one of ready-made keyboard controllers.

Through-hole soldering is IMO actually simpler than making these "spiders" (that's how in my country we call circuits with self-supported wire to wire joints, usually with at least some components hanging in air by their leads).

"Spiders" are prone to breaking with any repeatable mechanical strain. In case of this keyboard, what I am seeing is the plastic board will flex and will put repeatable strain on the wires, possibly leading to malfunction at some point. PCB would be much more reliable (if done correctly) as it would take most or all of the load from the joints.

A thicker PCB board would actually be more stiff than the plastic board you have here. Not only materials of PCBs tend to be very tough, the PCB, being below the level of the switches, would need much less cutouts that are weakening your plastic mounting board.

Stiffness of the board the switches are mounted to is important not just for the reliability, but also for the overall feel of the mechanical keyboard. This "feel" is mainly affected by the switches, the stiffness of the board, and the acoustics of the enclosure.

And lastly, as an amateur EE I find "spiders" appealing (if done nicely, artfully). But if you want to showoff for the larger audience that just "don't get it", a custom PCB would immediately score more points.

[+] rmaus|2 years ago|reply
There are certain kinds of fully custom keyboards, such as the one I use (Dactyl Manuform) where the keys do not sit on a single flat plane. Such a build would require a flexible PCB. This is doable for the advanced-amateur EE but the geometry is fiddly, at best, and doesn't allow for easy experimentation on key placement (spacing, offset, radius, etc, the bigger problem for me).

I've found the happy medium with single-switch PCBs ("Amoeba" is a popular one), which are fast and easy to wire up. Most notably you don't have to do the painstaking row wire stripping -- just use a plain wire from one PCB to the next in the key matrix (or an insulated wire if you have to traverse other components, which still only requires two stripped ends).

I have a few pictures floating around from my build(s) if that interests anyone.

[+] ajsnigrutin|2 years ago|reply
As an non-amateur EE, i fully agree with this. If you can draw a basic circuit for 9 keys on paper, you can draw a full-keyboard one in many of the easy cheap PCB platforms, most of which offer a web interface (no installation of any weird software), rendered 3d views and a very cheap production price.

If you really want to do it without a chinese PCB manufacturer, you can do it on a perf board ( https://en.wikipedia.org/wiki/Perfboard ). If you have more GPIOs than keys (eg when building a very cheap steam deck with 9/12 keys), you don't even need any kind of "matrix" multiplexing, and you can just connect the keys to individual gpio pins. If you take a better microcontroller than a teensy, you also get bluetooth (and wifi) capabilities, like with eg. esp32 (~$5 on aliexpress).

But either way, doing fun electronics, be it on a pcb or when soldering "in the air" is a lot better waste of money and time than many other things most people do.

[+] spinningarrow|2 years ago|reply
I think the biggest advantage of point to point wiring for a lot of people is that you can simply go ahead and do it at home. For PCBs, you need to know how to use one of the design tools but more importantly you need to find a place to print them.
[+] baz00|2 years ago|reply
Yeah this on all counts.

Ultimately it's probably better to have a triple-layer for the keyboard from what I can see. The faceplate that the switches are mounted on, the PCB and then the back plate. Could probably sandwich it all together easily.

There's nothing wrong with dead bug though but on this scale and reliability requirements and mechanical stress, it's the wrong solution for the problem.

[+] fellerts|2 years ago|reply
This method is usually referred to as "Dead Bug" style wiring in English, because the end result usually resembles a dead bug with its legs curled inwards.
[+] beeforpork|2 years ago|reply
Soldering 1N4148 so close to the glass body, plus using a thick drop of solder, makes it really easy to overheat the diode. They are everywhere because they are cheap, not because they are robust... The diodes may become unconditionally conductive, so it may not be an obvious bug.

I fried many of them, because my soldering skills were not that good, I did not read the data sheet and so my iron was too hot and I soldered them for too long. Plus by using short wires, all the heat transferred into that fragile glass body.

[+] qwerty456127|2 years ago|reply
Sounds very interesting. I have looked through premium and "custom" keyboards market recently and found out their customness mostly is about look&feel, key placement and omitting "unnecessary" keys while I want a positively custom set of keys: as many keys as possible - full keypad, multimedia keys separate from f1-12 keys, Windows context menu key, also programmable macro keys if possible, no spatial "optimizations" (when manufacturers try to fit all the keys into as little area as possible) etc. I concluded I will probably have to really build my own. My ideal keyboard would even have a ThinkPad-style trackpoint so I could operate the mouse pointer comfortably without removing my hands from the home row :-)
[+] unnouinceput|2 years ago|reply
Same here. All these modern keyboards are missing a lot of what old one had. The most I miss most is the Alt GR one, the bigger ENTER key and I want a lot of space. Call me fat fingers if you want.

So I started to actually create my own. And I want it to be programmable. And movable, as in you can move the key around, enlarge or shrink them. And when I say I want them programmable I meant to pull a little gizmo out of it, hook it up to a separate power source and load preset or connect to computer and use an app to make the keys look different.

So far my idea is to have each key include a magnet, an ESP32 chip and a small LED screen on top of it. The controller to all those 110+ ESP32 chips will be a RPi CM4 module, which will also be the USB connection for the PC. That's one iteration because this way I can actually have a click-clack mechanical one. The other iteration is to just have a big ass touch screen and the RPI underneath to just play that as an app that simulates the keyboard. Prettier, way more customizable as key positions/size go but no click-clack sound/feeling.

I'm $2000 in my research hole for this with nothing to show up for but is fun. Probably next year I'll finish it :)

[+] rgoulter|2 years ago|reply
> omitting "unnecessary" keys .... without removing my hands from the home row

The "keep hands on home row" is the motivation behind omitting the "unnecessary" keys, at least for the keyboards which use a small spacebar and give the thumbs more keys to use.

With those small 36-key keyboards, your hands pretty much have nowhere to go except to remain on home row.

> as many keys as possible

I once saw someone made a keyboard with 450 keys. https://relivesight.com/projects/433/

[+] thejosh|2 years ago|reply
Keyboards are getting smaller, but I love full size ones for programming.

I ended up getting the keychron v6, it's wired but fine. Their wireless keyboards are apparently a bit buggy, not sure if the new ones still are.

QMK is an absolute treasure. You can use your web UI to setup custom keymaps and stuff using the chrome USB feature. But I may have went off the rails, as it's pretty simple to completely customise your keyboard with layers etc if you know a bit of C.

Warning; this is a gateway into a land of a obsession. :-)

[+] wakeupcall|2 years ago|reply
My impression for the popularity of the 75% form factor is due to laptops and people being accustomed to never have used the "missing" keys in the first place. A tell-tale is that default layout even for thinkpads is to set the Fn row to media keys by default... An increasingly smaller number of people use them, despite being a row of freely remappable keys right _there_.

What I've seen happen though is that especially on linux you need two-modifier combos (ctrl-shift/ctrl-alt) to perform what you could have done with a single Fn keystroke. Or burn a few extra keys and increase complexity with layers. I went this route a decade ago, and I'm not a fan personally. Removing the Fn row saves 2cm of vertical space from your desk. I see it as completely pointless, even if you never use the Fn keys.

And I don't buy the "reduced finger travel" argument either. Holding the modifiers in weird positions to access an extra layer is usually worse than a more spacious keyboard where your hands can be kept further apart and require less chording.

But yeah... I commented on another thread on keyboards, and the current keyboard craze is mostly about customization and looks, and very little about the actual typing experience IMHO (there are exceptions of course..).

[+] drekipus|2 years ago|reply
Really you probably just want a normal keyboard with some good firmware.

I started out with a moonlander, which had a lot of keys (36 each hand) but to be honest, I'm trying to minimise as much as possible, and remove keys from it. That way I'm fully constrained to the home row.

Also, layers are amazing and sounds like something you might want to look into. Hold 'a' and use hjkl for media keys, etc. It's all very flexible

[+] hellweaver666|2 years ago|reply
Building your own keyboards is super satisfying. I started off hand-wiring a couple of macropads and then built a 60% handwire and a split ergo. Finally with all the knowledge I learnt I designed a PCB for a macropad and then just scaled up to my own keyboard which is a 50% ortholinear keyboard which has three extra "macro" switches on the side. I found a switch footprint that allows it to take "normal" or "low profile" style switches so I have a version for home and a super slim version for taking to the office.

I think the only thing I would do differently now is to dump QMK and use KMK instead as it's Circuit Python based which means that the firmware can be created and edited directly with your favourite IDE (QMK requires installing all sorts of extra software and compiling etc). If the Microcontroller ever dies on this board I will definitely swap it out for a CircuitPython compatible alternative!

[+] barrenko|2 years ago|reply
Could you please post a picture as well? (this goes out to other enthusiasts in this post)
[+] bmitc|2 years ago|reply
Is there a general source of the, seemingly modern day, fascination with keyboards?

I buy the Logitech ergonomic mice and keyboards and call it a day, because they save my wrists but aren't crazy, are easy to buy off the shelf, and integrate well together. For example, I use two different mice and a keyboard across two computers with a single USB receiver with just a simple KVM built-in to my monitor.

In my personal experience with computers, the keyboard is the least limiting factor with regards to my interaction.

[+] Karrot_Kream|2 years ago|reply
It's a mix of three different cultural factors long extant in the programming community which came together to create today's keyboard culture:

1. Keyboard elitism

Until as late as the early 2000s, there was a lot of elitism in programming circles about how using the mouse was something only "lusers" did. Keyboarding was supposedly faster than mousing (even though programmers do a lot more thinking than either keyboarding or mousing) and was the mark of an expert user. These communities would often shill certain keyboards, like the IBM Model M, or the Happy Hacking Keyboard (HHKB) because of their resilience and the feedback one felt from clacking the keys.

2. Customizing/Hacking

Not much has to be said here. Hackers have been customizing their setups for as long as setups could be customized. The ability to program custom keyboard layouts and make custom keyboard firmware is as iconic hacking as it gets.

3. Setup as identity culture

From the late 2000s, Unix Porn and a lot of other "setup porn" stuff became very popular. People would make cool setups that they really identified with and so setting up your keyboard to express your personal identity became a bit of a hacker rite of passage.

While keyboard culture may have started with these ingredients, it's definitely its own thing these days. I'm not in it myself but I like watching it from the sidelines and it's really cool to see what people come up with. Cool layouts, custom firmware, colored keys, experimenting with different layouts. It's just like trying to get the perfect emacs config: more bikeshedding than productivity hack, but I mean it's a hobby, and a fun enriching one at that.

As you say the more practical thing is to just buy an ergo keyboard that works with your wrists/shoulders/neck and call it a day. I have a Model M from when I was an impressionable teen who thought owning a Model M and not using the mouse was the be-all-end-all of being a power computer user, but I mostly use a Kinesis Ergo for my day-to-day computing needs. I'm at a (hybrid) startup these days and we don't really have a dedicated office to store stuff in so I bring an HHKB in to the office because of its portability. I use trackballs for my mousing. That's about it. Holding my arms, wrists, and back in ergo positions is much more important to me than any keyboard really. Though really rock climbing has been the single thing that helped my wrists beat RSI where nothing else really could.

[+] sleepybrett|2 years ago|reply
If you want to understand how keyboards function go ahead and do this, but unless you want a really wild layout this is just makework. There are cheap, reliable and flexible pcbs for just about every layout you could want available on the open market from sites like kbdfans and aliexpress not to mention dozens of local mom and pop sites that service the mechanical keyboard industry. It's a pretty big hobby these days.
[+] bArray|2 years ago|reply
Rather than use the knife to cut sections out of the wire, I would have considered getting some single core wire and sliding pre-cut heat shrink down it - that way you don't risk cutting into the wire. Just remember to let the core cool between heating/soldering to prevent premature shrinking.
[+] winrid|2 years ago|reply
What I really want is a mechanical backlit keyboard without terrible PWM flicker. It's so hard on the eyes. Just regular DC dimming would be ideal.
[+] thorncorona|2 years ago|reply
Much easier to just up the PWM frequency