How to Build a Handwired Mechanical Keyboard
Construct a monolithic 546% custom mechanical mega-keyboard by handwiring chained switch matrices across linked chassis zones using QMK firmware.
- Read the tools, materials, safety notes, and steps below for free.
- Tap Start Camera Coach when you want hands-free voice help.
- Allow camera and microphone. Point your phone at the work; the coach watches your progress and tells you the next step.
๐งฐ Required Tools & Equipment
- โ Temperature-controlled soldering station
- โ Precision wire strippers (28-30 AWG)
- โ Digital multimeter with continuity beeper
- โ Flush cutters
- โ Hex driver set (M2/M3)
- โ Anti-static tweezers
๐ฆ Materials & Supplies
- โ 300+ MX-style mechanical switches
- โ 1N4148 switching diodes (300+ pcs)
- โ 3x RP2040-Zero or Pro Micro controllers
- โ Laser-cut acrylic switch plates and baseplates
- โ Solid core 24 AWG and 28 AWG hookup wire
- โ M3 brass standoffs and countersunk screws
- โ TRRS jacks and 4-pole interconnect cables
โ ๏ธ Safety Checkpoints & Warnings
- โข Operate a solder fume extractor or work in a well-ventilated space to avoid inhaling rosin core flux fumes.
- โข Verify zero shorts between VCC/5V and GND on every controller with a multimeter before plugging USB into a computer.
- โข Use heat-resistant mats when resting hot iron tips and keep bare wires clear of conductive frame elements.
๐ Step-by-Step Guide (7 Steps)
Plate Preparation and Switch Installation
Align the multi-segment laser-cut acrylic top plates over your workbench and secure plate joining brackets with M3 hardware. Snap MX-style switches firmly into every mounting cutout until both side clips engage with an audible click. Orient every switch uniformly with the LED/contact pins facing the top edge to standardize your wiring rows.
- โข All switch bodies sit flush against the acrylic plate with no tilted housings
- โข Switch contact pins are uniformly aligned horizontally across all extended sections
- โข Installing switches backwards in specific zones, which reverses diode polarity during soldering
- โข Cracking brittle acrylic plates by over-torquing structural M3 joiner screws
Bending and Soldering the Diode Matrix Rows
Bend the black-banded cathode leg of a 1N4148 diode at a 90-degree angle right at the diode body. Solder the non-banded anode leg directly to the top-left pin of each mechanical switch. Daisy-chain the cathode legs across each horizontal row, snipping excess leads with flush cutters to maintain a low vertical profile.
- โข Every switch has a diode soldered to its left pin with the black band facing downstream
- โข A continuous, insulated horizontal bus connects every diode along each individual matrix row
- โข Inverting diode polarity on random switches, resulting in unregisterable or ghosting keys
- โข Overheating switch pins, which melts internal plastic leaves and ruins switch actuation
Routing and Soldering the Matrix Columns
Strip small 2mm windows into 28 AWG insulated hookup wire corresponding to each vertical switch pin interval. Solder the exposed copper directly to the open right-hand contact pin of each switch down the entire column. Keep column wires elevated slightly above row lines or use fully insulated cross-overs to prevent unintended shorts.
- โข Vertical column wires run cleanly perpendicular to horizontal diode rows without contact
- โข Solder joints form shiny, concave fillets over the right switch contact pins
- โข Melting wire insulation during cross-overs, creating hidden row-to-column short circuits
- โข Using excessively thick wire gauges that prevent bottom case plates from closing flush
Controller Pinout Wiring and Master-Slave Links
Mount your primary RP2040 controller in the central bay and secondary controllers in peripheral wings. Solder dedicated row and column bus lines to assigned GPIO pins on each board. Connect TX, RX, VCC, and GND pins between controllers using TRRS breakout jacks to enable high-speed serial communication across the ultra-wide layout.
- โข Every row and column bus terminates neatly at its designated GPIO pad
- โข Interconnect TRRS breakout pins show zero ohms continuity across linked controller zones
- โข Crossing TX and RX serial lines between controllers, preventing secondary zones from enumerating
- โข Soldering to non-GPIO or boot-strap pins that lock the microcontrollers during startup
Electrical Continuity and Matrix Validation
Set your digital multimeter to continuity mode and ground the negative probe on a column line. Touch the positive probe to corresponding row outputs while manually depressing each switch to confirm the circuit closes. Repeat this process systematically across all zones to verify no dead switches or crossed traces exist before sealing the frame.
- โข Multimeter emits a solid tone only when a switch is fully actuated
- โข Zero electrical continuity is measured between adjacent rows and columns when keys are unpressed
- โข Skipping continuity testing before flashing, making hardware debugging significantly harder later
- โข Ignoring intermittent beep signals caused by cold solder joints on matrix junctions
Firmware Compilation, Flashing, and Key Testing
Define your custom pin matrix array and split-transport settings in QMK or Vial firmware source files. Compile the `.uf2` binaries and flash each controller by holding the boot button while inserting the USB cable. Launch an interactive keyboard testing utility to press every single key, ensuring all 500%+ inputs register uniquely with zero debounce chatter.
- โข Microcontroller mounts successfully as a HID keyboard device on your PC
- โข Graphical key tester lights up green for all matrix locations across the primary and extended zones
- โข Mismatched row/column matrix sizes in the header configuration file causing shifted keymaps
- โข Forgetting to assign unique EE_HANDS or master/slave definitions to secondary controllers
Final Chassis Enclosure and Keycap Assembly
Install non-conductive insulating foam along the bottom acrylic baseplate to shield exposed solder joints. Fasten the bottom plate to the upper switch assembly using M3 brass standoffs and nylon-threaded nuts. Mount your preferred keycap sets across all alphas, macro clusters, and auxiliary functional decks to complete the mega-board.
- โข Baseplate is completely rigid with no bulging over thick internal wiring bundles
- โข Keycaps sit level across all clusters without rubbing against adjacent switch stems or frame borders
- โข Omitting bottom insulation, allowing solder tails to pierce chassis foil and short the matrix
- โข Overtightening peripheral screws, causing the long mega-keyboard assembly to bow upwards in the center
Credit: inspired by an original tutorial by Glebo โ watch the original on YouTube.
Don’t have everything?
- No Wire stripper for 28 AWG wire? Soldering iron tip to quickly melt and push back small insulation windows
- No TRRS breakout jacks? Direct 4-wire ribbon cable soldered between controller VCC, GND, TX, and RX pins
- No Brass standoffs? Stacked M3 nylon hex nuts or 3D-printed spacers