How to Build a Custom Keyboard With Mechanical Switches: A Complete Guide

Kannon Yamada 23-05-2018

Custom keyboards are easy to build. You just need five parts:

  • A printed circuit board (PCB)
  • A case to hold the board
  • Keycaps
  • Stabilizers
  • Mechanical switches

I recommend also buying a backplate, which increases durability and typing stability. If you just want to make your keyboard look nice, I have some tips at the end of this article for sprucing things up. But first, let’s explore how you can build your own custom mechanical keyboard.

Required Tools for Keyboard Assembly

At a minimum, you need two tools to solder a keyboard together: a low-wattage soldering iron and some Rosin core solder.

If you just want a quick, cheap, and dirty way to get started, look at a soldering combo deal that includes almost all the stuff you need to get started:

  • Low-wattage soldering iron: If you are a novice, feel free to buy a cheap low-wattage iron. Hotter irons may melt faster, but they’re not for novices. For those who want a little more, buy an adjustable wattage iron. I have an Aoyue model that’s compatible with 900M tips and it’s never failed me.
  • Rosin-core solder: Solder is basically a tin-lead alloy that melts at low temperatures. The Rosin inside of the solder is an organic compound designed to remove impurities that degrade conductivity. It liquifies when heated, which causes it to spread over the solder joint.

Optional (but Recommended) Tools

Some optional—but highly recommended—tools include a solder sucker, steel wool, cotton swabs, and 90% alcohol:

  • Solder sucker: If you make a mistake, a solder sucker can pull up heated solder.
  • Steel wool: A steel wool pad is used to clean the tip of a soldering iron without causing damage. The cheaper ones are abrasive but if you’re using a throw-away soldering iron, they’re a good choice. Otherwise, invest in a brass cleaning pad that’s designed for a hot iron.
  • Cotton swabs: A cotton swab is used to apply alcohol to the board.
  • 90% alcohol: High-proof alcohol with no additives is great for removing Rosen flux residue.
  • Keycap puller: While putting on keys is a snap, removing them isn’t. There are two kinds of keycap pullers out there: wire pullers and plastic. I recommend using a wire puller. The model above, though, is both in the same package.

You may also want a non-conductive surface that you can work on. I prefer using a wooden cutting board. Wood is resistive, meaning it doesn’t conduct electricity easily.


Buying the Mechanical Keyboard Parts

Everyone needs something different from their keyboard. A typist might want an experience similar to a clacky analog typewriter. An interior designer might prefer a colorful aesthetic.

With endless customization options, building a keyboard lets the user create something that no manufacturer produces. The only trick is in finding the parts to build a tricked-out word-smithing machine.

There are five (or seven) components that you can choose:

  1. A printed circuit board (PCB)
  2. (Optional) A plate
  3. Keyboard case
  4. Mechanical switches
  5. Keycaps
  6. Stabilizers
  7. (Optional) LEDs

The Easy Option: DIY Mechanical Keyboard Kits

If you mainly want to learn how to solder, and don’t care about customization, get an unassembled mechanical keyboard kit. An unassembled kit includes all the basic components so there’s less hassle. An excellent deal right now is the YMDK71 Mechanical Keyboard Kit. It also includes a battery for wireless operation over Bluetooth.


build custom mechanical keyboard using a kit

The easiest way to get started with a DIY mechanical keyboard is to buy a kit. Each DIY keyboard kit varies, but they include a printed circuit board (PCB), sometimes a backplate, a case, and mechanical switches. Those who know exactly what parts they want should purchase the components separately from one another. It may cost more, but the customization options are considerable.

Note: I don’t like Bluetooth-only keyboards 6 Reasons Why You Should NOT Buy a Bluetooth Keyboard Before you commit to buying a Bluetooth keyboard, consider these drawbacks and issues that may cause you to change your mind. Read More , but the YMDK71 appears to offer both wired and wireless connectivity.

1. Keyboard Printed Circuit Board

Out of the five main components, the most important is the printed circuit board (PCB). The PCB determines the layout and function layers of the keyboard. Generally speaking, PCBs come in several kinds of form factors—most of which are based on the number of keys it can accommodate.


The most popular of these DIY keyboard PCBs is the 60% form factor. Like the name suggests, a 60% keyboard includes 60 keys. But there are other kinds of keyboards out there, including the 40%, 75%, 87%, and more.

On AliExpress, you can purchase a variety of PCBs, including GH60, YYD75, DX64, and others. (Of these, I prefer the DX64 because it includes a right-side directional keypad and uses the same case as most 60-key variants.)

build custom mechanical keyboard - printed circuit board

Among the more exotic PCBs, there is the ErgoDox Mechanical Keyboard, which is designed for ergonomics. There are also boards with upside-down holes for LED lights, which allows for compatibility with front-printed keycaps.


Some PCBs (like the fully assembled ErgoDox EZ) offer solderless plug-and-play designs that make it a snap to switch out switches. Most options out there, however, don’t offer such a luxury. I do not recommend putting together an ErgoDox as your first keyboard. While great, it’s not suitable for an entry-level soldering project.

Important Points to Note:

  • The PCB must match the case!
  • The PCB determines whether you have LED backlighting.
  • If you do have LEDs, the PCB determines whether you use front-printed or top-printed keycaps.

2. Keyboard Plate

The keyboard plate helps anchor switches and provide additional stability and reliability. While plastic stabilizers exist (and there’s nothing wrong with them), the most common are steel and aluminum.

build custom mechanical keyboard - keyboard plate

In my experience, aluminum plates tend to get warped to bent during shipping, whereas steel is supremely durable but heavy. I recommend steel if you can find it. But aluminum is a fine choice if you prefer mobility.

Plates also come in different colors. I suggest carefully thinking about the aesthetic of your build before buying any part.

3. Keyboard Cases

It’s a good idea to purchase the case alongside the PCB. Most vendors offer a case as a combo deal. Combo deals cost less overall and buying both from the same vendor also guarantees compatibility. For the most part, GH60 cases fit most other 60% keyboard PCBs.

build custom mechanical keyboard - keyboard case

The tell-tale indicator of whether or not the case will fit the PCB is by looking at the screw holes. If the screw holes match the PCB, chances are you have the right case.

4. Mechanical Switch

After a PCB, the mechanical switches How Does a Mechanical Keyboard Work? How do mechanical keyboards work and how do they differ from standard keyboards? They're popular with gamers and writers for a reason! Read More are the second most important component. But there are many kinds to choose from.

A mechanical switch gives a mechanical keyboard its distinct feel and sound. When pressed, each kind of switch has a different feel (or tactile feedback), sound, and springiness (measured in grams required to actuate a key). Light, smooth actuation is great for gamers, such as most red-colored switches. Others are designed to emulate a typewriter. My favorite is the lightest, smoothest, and quietest switch (Gateron Clear).

build custom mechanical keyboard - mechanical switches

There’s some history here. The first small mechanical switches came from Cherry GmbH. But since their 1982 mechanical switch patent expired in 2014, competition has emerged. Now dozens of companies make keyboard switches. Some of these switches are shameless clones of Cherry’s original design. Others have improved or modified the original Cherry design.

Today’s switches include quite a few brands. Of these, Gateron ranks toward the top of the list in affordability and quality. However, there are a few exotic switch types out there.

For example, some of the more radical technologies out there include Varmilo’s electro-capacitive Sakura contactless switches, which dispense with mechanical key actuation—a fancy way of saying that the switch relies on fewer mechanical components.

In case you are interested in learning more, some other examples include Kailh, Razer, Outemu, Greetech, and Zealio. All of these switches can be found with something called a switch tester. Of the testers (or samplers) out there, check out the Gateron 9-switch tester. By slapping together an array of different kinds of switches, you can find out what matches your individual typing style.

NPKC 9 key Gateron Green Clear White Gray Clear Zealio Purple Switches Shaft Testing Tool Switch Tester NPKC 9 key Gateron Green Clear White Gray Clear Zealio Purple Switches Shaft Testing Tool Switch Tester Buy Now On Amazon $12.90

For a more thorough explanation of switches, check our look at which kind of mechanical keyboard is right for you Which Mechanical Keyboard Should You Buy? 6 Keyboards for Typists and Gamers While CPUs and GPUs remain essential to computer performance, there's an underappreciated peripheral: the keyboard. Everyone uses keyboards, but few people think about them when buying a new PC. Read More .

5. Keyboard Keycaps

Keycaps vary in where the letters are printed on the key, how the letters are printed, and the materials used in the key. These features contribute to the key’s durability and visibility (particularly when LED lights are used).

LEDs: If your PCB has the LED terminals in front of the key, that means you want front-typed keys. If the LED holes are in the back, you want top-printed keys.

Lettering: If you don’t have LED lighting, you want dye-sublimated keys. Dye-sublimated lettering won’t wear off for many years of hardcore typing. Double-shot lettering, where the symbols are made from plastic, is more durable—but it’s designed for lit keyboards.

build custom mechanical keyboard - keyboard keycaps

Materials: In general, the materials used to build keys are PBT, ABS, and occasionally silicone, metal, or rubber. While PBT is more durable and doesn’t become glossy after years of use, it’s also more expensive. However, I did purchase a set of PBT double-shot keycaps which cost $10 for a full set of 104 keys.

6. Stabilizer: Cherry vs. Costar

Longer keys, like the spacebar, shift, and enter keys will wobble when pressed, unless you have a stabilizer. A stabilizer plugs into the left and right sides of the keycap.

There are two kinds of stabilizers out there: Costar, which runs a stabilizer bar above the plate (if you have a plate), and Cherry, which runs the stabilizer bar under the plate. For example, here’s a comparison between Cherry (top) and Costar (bottom):

build custom mechanical keyboard - stabilizer

Of the two types, I prefer Costar stabilizers. Costar is simpler to work with, although they sound slightly more rattly compared to Cherry. Cherry stabilizers suck if your keyboard has a plate. In order to change the stabilizer bar, you must desolder the switch.

On top of that, there are two varieties to deal with: the type that works with plate-mounted switches and the kind that work with PCB-mounted switches. If you are putting together a keyboard for the first time, it’s an easy mistake to buy the wrong stabilizer.

Costar isn’t without its faults. Aside from producing more noise, it also won’t work with some kinds of keycaps. However, most people are probably better off with Costar. Here’s a video on how to install them:

7. Light Emitting Diodes (LEDs)

If you get an LED-compatible PCB, consider buying LEDs. It may double the amount of time it takes to put your board together, but they look amazing!

LEDs come in a variety of colors. There are even color-changing LEDs (although these require three pins). I recommend buying on eBay. You might wait a couple weeks, but buying from a seller based in Hong Kong costs around $5 for 100 LEDs.

build custom mechanical keyboard - LEDs

The specs needed for most boards are flangeless and 3mm. There are both white LEDs with color filters and clear LEDs that produce the desired hue. It doesn’t matter what type you go with. PCBs are designed to work with different kinds of LEDs, so don’t worry about voltage differences between the different colors.

how to build your own mechanical keyboard

There are also SIP sockets, which allow you to swap out your LEDs without having to solder them. If you plan on changing the colors frequently, a SIP socket is a good idea. Also, if your board doesn’t clearly indicate negative and positive polarities, a SIP socket allows you to avoid having to desolder if you make a mistake.

How to Build a Mechanical Keyboard

Before getting started, considering learning basic electronics skills Beginner's Electronics: 10 Skills You Need to Know Many of us have never even touched a soldering iron - but making things can incredibly rewarding. Here's ten of the most basic DIY electronics skills to help you get started. Read More . For those interested in learning more basic skills, here are some DIY soldering projects to get started Learn How to Solder, with These Simple Tips and Projects Are you a little intimidated by the thought of a hot iron and molten metal? If you want to start working with electronics, you're going to need to learn to solder. Let us help. Read More .

The primary scope of this article isn’t to build a keyboard, but I will touch on some essential assembly instructions. In general, the build should occur in the following order:

  1. Inspection and layout
  2. Preparing the PCB
  3. Prepare the plate
  4. Prepare the stabilizers
  5. Insert the switches
  6. Insert and bend the LEDs
  7. Begin soldering
  8. Clean up
  9. Inspection and testing

1. Inspection and Layout of Your PCB

The first basic step is to inspect the motherboard, switches, and LED lights (if you have LED lights) for signs of damage. Then mentally imagine going through the next five steps. By preparing a mental image of what the next steps require you will reduce mistakes and de-solders (a tedious pastime).

2. Prepare the PCB

In this step, you want to examine the PCB for signs of shorts or other bizarre marks. If you do see residue or other marks on the motherboard, you can clean it using a cotton swab and a high-proof alcohol designed for electronics. I know people who use medicinal alcohol, but that carries a chance of creating a short.

3. Plate (Optional)

If you have a plate, the plate needs to be placed directly over the PCB so that it can accommodate the switches. There will be a gap between the plate and the PCB.

build custom mechanical keyboard - plate

The switches anchor the PCB in place. Overall, plates make assembling a keyboard much easier compared to soldering the LEDs and switches directly to the mainboard.

4. Stabilizers

The stabilizers will need to be inserted into position at this point. There are both Cherry and Costar-style stabilizers. As noted above, the basic difference between the two is the Costar stabilizers are easier to install but cause some rattling while typing. Cherry produce less noise but require a somewhat difficult installation process on some plates.

build custom mechanical keyboard - stabilizer

You’ll notice that Costar stabilizers come with plastic bits that plug into the keycaps. These bits hook into the stabilizer bar.

how to build your own mechanical keyboard

The stabilizer wire then snaps into the stabilizers that are attached to the plate.

5. Switches

This is where things become a little more complex. In order to reduce how much the circuit board flexes during installation, it helps to first install a switch at each corner of the board. You must fully press the switch into the plate in order to get the switch’s pins to appear on the other side of the board. If the pins do not fully extend, you’ll have problems getting electrical conductivity.

build custom mechanical keyboard - switches

If the switch’s pins are bent before insertion, they won’t extend out the back of the PCB. You must make sure that the pins are straight before inserting the switch into the PCB. As you put more switches in, distribute them evenly around the keyboard. By doing so, you reduce the amount of force exerted on the circuit board.

how to build your own mechanical keyboard

If you opted to anchor the switches directly onto the PCB, this step is less difficult as the switches press into the board with little effort.

6. Insert and Bend the LEDs

Single-color LED lights include two pins. The longer pin is positive and the shorter is negative. On most PCBs you’ll notice that the holes for LEDs on the board are marked with either a negative or positive symbols. When you insert the LED into the holes, make sure that the longer leg of the LED inserts into the hole that’s marked as positive.

how to build your own mechanical keyboard

The tricky part here is that oftentimes the LED holes for the bottom-row keys (such as spacebar, Alt, and Ctrl) are inverted, meaning that the terminals are on the opposite side. I made the mistake of soldering the bottom row LEDs into place incorrectly and had to unsolder them.

After inserting each LED, make sure it’s fully inserted and bend the legs. Bending the legs will prevent the LED from slipping back into the board. Even a slight slippage can cause the LED to protrude out enough to prevent a key from being fully pressed down.

how to build your own mechanical keyboard

Now flip the board over. It’s time to solder.

7. Begin Soldering

A good way to solder is to move in the same way you read a book. Start at the pins on the upper left side and move from left to right. If you do take breaks, make sure that you use a cotton swab and alcohol to remove the organic residue left behind by the Rosen flux. If you leave it drying overnight, the Rosen hardens and then requires a scraper to get it off.

Here’s a video on how to get started soldering:

I have one warning about the video above. Flicking solder off can be dangerous. I recommend using—at the very least—steel wool designed for solder removal.

8. Clean Up

Because Rosen core solder is potentially slightly conductive once caramelized, you need to do some cleaning. Remember that Rosen will harden if left exposed to the air for too long, so you will want to clean immediately upon finishing soldering. Otherwise, you will need to scrape it off.

9. Inspection

Finally, you will want to inspect every single solder point for signs of weakness. A good solder joint will last the lifetime of the product. A bad joint may crack and split eventually. A “cold solder” may not conduct electricity properly.

Most bad solder joints, though, can just be reflowed (or reheated) to correct problems. So don’t worry too much about making mistakes. The point of this project is to learn, not be perfect.

Other Tips for Custom Mechanical Keyboards

You can continue customizing your keyboard with other features like noise-dampening alterations, color-changing LED filters, and more.

Vinyl wrap: The easiest way to customize a keyboard is with vinyl wrap. Vinyl wrap is a thin layer of adhesive vinyl. It comes in a variety of colors, patterns, and textures. In general, applying vinyl requires a hairdryer, water and soap, and a cutting instrument

Color filter: Color filters can pop over a Cherry (but not most other brands) mechanical switch’s LED. They’re most useful for white lights, although they can go over any colored LED.

Noise-dampeners: You can find O-ring style dampeners or more expensive models, like the QMX clips. I’ve found they both reduce sound by a small, but not insubstantial amount. QMX clips come in PCB and plate-mounted varieties.

Your Custom Mechanical Keyboard Is Finished!

Anyone who uses a keyboard for most of their day needs a mechanical keyboard. Whether you’re a stenographer, gamer, coder, writer, or anyone who spends a lot of time typing, the right keyboard can work or play a little more comfortable and productively.

Decided you don’t want to build one? Have a look at the best mechanical keyboards you can buy The 7 Best Mechanical Keyboards of 2019 Mechanical keyboards have a distinctive feel that's arguably better. Which is the best mechanical keyboard for you? Read More instead. And if you need a backup device, check out the best wireless all-in-one keyboards The 10 Best Wireless All-in-One Keyboards for Mac and PC Wireless all-in-one keyboards can transform any computer into a home theater system. But which one should you buy? Read More too.

Explore more about: DIY Project Ideas, Electronics, Keyboard.

Whatsapp Pinterest

Enjoyed this article? Stay informed by joining our newsletter!

Enter your Email

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Elyn
    August 27, 2018 at 6:29 am

    If you want to build a fully custom designed mechanical keyboard rather than buying a keyword PCB kit, you have to start from the PCB design, then get the PCB manufactured and assembled. Usually letting a PCB manufacturer doing the PCB manufacturing and assembly work can be much easier than do-it-yourself. If you need, feel free to reach PCBCart ( and see what value-added service it can offer to bring your mechanical keyboard into cool keyboard!