Skip to content

Mechanical keyboard PCBs and firmware

PCB and Firmware

A mechanical keyboard PCB is the circuit board that reads every switch and runs the firmware. 5 attributes define one: firmware, hot-swap sockets, rollover, connectivity and layout compatibility.

By Head Crusher GadgetPublished

  • The PCB reads every switch and runs the firmware.
  • QMK, VIA, Vial and ZMK are the main open firmware options.
  • USB boot keyboards report 6 keys at once; NKRO reports any number.

In plain English: The PCB is the keyboard's circuit board, and the firmware on it decides what each key does.

Which five attributes describe a mechanical keyboard PCB?

A mechanical keyboard PCB has 5 attributes on a spec sheet: firmware, hot-swap support, rollover, connectivity and layout compatibility. Each attribute carries a listed value that you compare before you buy or build.

The PCB, short for printed circuit board, is the board that connects every switch in the keyboard. QMK documents the matrix of rows and columns that the board scans to find the pressed key, and the firmware on the board turns that signal into a keycode. You meet these 5 attributes on product pages, so a quick look at each one clarifies the spec sheet.

The table lists each attribute with one example value and the publisher of that value.

Attribute Example value and unit Publisher
Firmware QMK, VIA, Vial or ZMK Project documentation
Hot-swap support Keychron Q4 supports 5-pin and 3-pin switches Keychron
Rollover USB boot keyboard reports 6 non-modifier keys USB-IF
Connectivity Keychron Q1 Max lists a 4000 mAh battery, up to 180 h and 1000 Hz polling Keychron
Layout compatibility PCBs and frames in Cherry’s DIY series have a multi-layout design Cherry

Each row reads as a plain fact. The firmware row names 4 firmware projects, the hot-swap row shows a board that accepts 2 pin types, the rollover row shows the 6-key limit of a boot keyboard, the connectivity row pairs a battery size with listed hours, and the layout row describes PCBs that fit more than one bottom row. The sections below take the attributes one at a time.

Which firmware runs on a mechanical keyboard PCB?

Four firmware projects run mechanical keyboards: QMK, VIA, Vial and ZMK. QMK is an open source community, VIA lists 1400+ compatible keyboards, Vial is a QMK fork with a GUI, and ZMK is MIT-licensed.

Firmware is the program stored on the PCB. It decides what each key sends to the computer, and each project documents its own configuration route. QMK describes itself as an open source community developing computer input devices, and its FAQ states that QMK is a heavily modified fork of TMK that took the QMK name in 2015.

The table lists the 4 projects with what their own documentation says.

Firmware What the project documentation states Configuration route
QMK Open source community for computer input devices QMK configurator, compile and flash
VIA Lists 1400+ compatible keyboards; tagline “configure, test and design in one place” VIA keyboard configurator
Vial Open-source cross-platform GUI and a QMK fork Vial GUI
ZMK MIT license, built on Zephyr RTOS, wired and wireless devices ZMK documentation

Cherry’s DIY series documents the QMK route in a fixed order: choose the board in the QMK configurator, compile the firmware, install the Zadig driver, enter bootloader mode and flash. Cherry dates that article 05/2020, so the current QMK documentation is the reference for today’s tools.

VIA and Vial configure a QMK-based board, while ZMK is a separate firmware built on the Zephyr operating system. Keychron names the Q1 Max “QMK/VIA” in its product title, which shows the pairing on a real board. The QMK firmware page covers the base project in more depth.

How does firmware remap keys and use layers?

Firmware maps each physical key to a keycode and stacks layers above a base layer. QMK processes layers from the highest active layer down, and its layer 0 is the base typing layer.

A keycode is the code the firmware sends when you press a key, and a layer is one full set of keycodes for the whole board. Remapping changes the keycode assigned to a key, and a layer lets one key carry more than one job. Keychron lists its Launcher web app for key remapping and macros on the Q1 Max, and VIA describes its own role as a place to configure, test and design in one spot.

QMK documents 3 layer rules in its layers guide. The list below states them in order.

  1. Layer 0 is the default base layer.
  2. QMK processes layers from the highest-numbered active layer down.
  3. MO(layer) momentarily activates a layer while you hold the key.

Those 3 rules explain why a function layer overrides the base layer only while it is active. When you release the MO key, QMK drops back to the layer below, and layer 0 is where typing resumes.

Does the PCB support hot-swap switches?

A hot-swap PCB has sockets that hold switches without solder. Keychron lists the Q4 as hot-swappable for 5-pin and 3-pin switches, and Cherry lists the KW 300 MX as hotswap yes and the G80-3000 as hotswap no.

A socket grips each switch pin, so you pull a switch out and press another in. A board without sockets needs every switch soldered to the PCB, and Cherry’s DIY series includes a soldering step for exactly that case. The table shows 3 boards and their listed hot-swap status.

Board Maker Hot-swap (yes or no) Switch pin types (pins)
Q4 Keychron Yes 5-pin and 3-pin
KW 300 MX Cherry Yes Not stated
G80-3000 Cherry No Not applicable

The listings give a clear split: 2 of the 3 boards use sockets and 1 board uses soldered switches. The hot-swap keyboards page lists what to check on a socketed board before you buy.

What is the rollover of the PCB?

A USB boot keyboard reports up to 6 non-modifier keys at once, called 6KRO, according to the USB-IF HID specification. NKRO reports any number of keys, and Keychron lists NKRO for the Q1 Max in wired and wireless modes.

Rollover is the number of simultaneous key presses a board reports. QMK’s glossary defines N-key rollover as reporting any number of key presses at once, and QMK enables it with the NKRO_ENABLE option. QMK explains the matrix problem behind the limit: without a diode after each switch, pressing 2 or more keys registers a key that you did not press, which is called ghosting.

The table compares 3 boards and one standard on their listed rollover.

Board or standard N-key rollover (yes or no) Keys reported (keys) Publisher
USB HID boot keyboard No (6KRO) 6 non-modifier keys USB-IF
Keychron Q1 Max Yes, wired and wireless Any number Keychron
Cherry KC 200 MX Yes Any number Cherry
Cherry G80-3000 No Not stated Cherry

Rollover appears on spec pages as a yes or no field, and the listed boards carry both values. Check that field before you buy a board for fast typing or for held-key combinations.

How long does a wireless keyboard battery last?

Wireless PCBs list a battery capacity and hours of use. Keychron lists the Q1 Max at 4000 mAh and up to 180 hours, the V1 Max at 190 hours and the K3 Max at 1550 mAh and 86 hours.

Connectivity on a PCB means wired USB, Bluetooth or 2.4 GHz, and each wireless board lists its battery next to its polling rate. Polling rate is the number of times per second that the keyboard reports to the computer. QMK sets the USB polling interval in milliseconds through USB_POLLING_INTERVAL_MS, so a 1000 Hz rate equals a 1 ms interval.

The table shows the 3 Keychron boards with their listed battery, hours and polling.

Board Battery (mAh) Listed hours (h) Polling rate (Hz)
Keychron Q1 Max 4000 Up to 180 1000
Keychron V1 Max 4000 Up to 190 1000
Keychron K3 Max 1550 Up to 86 1000

The listed hours are manufacturer figures, and the K3 Max pairs the smallest battery with the shortest listed run time. Wooting lists “True 8kHz” polling for the 80HE, which shows that polling rates reach beyond 1000 Hz. ZMK’s documentation lists low-latency BLE and multi-device BLE support for wireless boards. The wired vs wireless mechanical keyboards guide compares the two connection types.

Which layouts does a mechanical keyboard PCB support?

PCBs and frames in Cherry’s DIY series have a multi-layout design, so the bottom row changes with the layout you install. Cherry advises deciding the layout before any soldering starts.

A multi-layout PCB carries mounting points for more than one bottom row. Cherry names the keys affected: the space bar, Enter, Caps Lock, Backspace and Shift. Cherry’s series installs switches and keycaps on the bottom row first, so the mounting points sit correctly and nobody desolders a wrongly placed switch. The layout step comes before soldering in Cherry’s order.

The next two parts of a PCB, the lighting and the cable, follow from the same board.

How does RGB lighting work on a mechanical keyboard?

RGB lighting uses LEDs on the PCB that shine around or through the keycaps. Keychron lists south-facing RGB LEDs on its Q1 Max and north-facing LEDs on the K3 Max.

Cherry describes its MX RGB light path in 1 sentence: a lens set directs the illumination from the SMD LED on the circuit board into the keycap. Gateron lists SMD LED support for its Glory switches. On the firmware side, QMK documents the RGBLIGHT_ENABLE option to enable keyboard underlight functionality.

What does a keyboard USB-C cable carry?

A keyboard USB-C cable carries power and data. USB-IF publishes the Type-C cable and connector specification, and QMK sets a default maximum USB power consumption of 500 mA for the device.

Keychron lists the Q1 Max with a wired USB connection at 1000 Hz polling, and the same board runs on its 4000 mAh battery in wireless mode. The cable choice follows the connection type you want from a board. The how to choose a mechanical keyboard guide carries these PCB choices into a purchase decision, and the hot-swap keyboards page covers the socket choice.

Browse by Category

1 of 11 pages are published here. 10 more are listed as coming soon.

Questions and answers

Each question below has a short, direct answer you can read on its own.

What is a mechanical keyboard PCB?

A mechanical keyboard PCB is the printed circuit board that connects every switch, reads key presses through a matrix of rows and columns, and runs the firmware. QMK explains that diodes after each switch stop unintended keys from registering when you press 2 or more keys at once.

What firmware do mechanical keyboards use?

Mechanical keyboards run QMK, VIA-enabled QMK, Vial or ZMK firmware. QMK is an open source community, VIA lists compatibility with 1400+ keyboards, Vial is a QMK fork with a GUI, and ZMK is MIT-licensed firmware built on the Zephyr operating system for wired and wireless boards.

What does a hot-swap PCB do?

A hot-swap PCB has sockets that hold switches without solder, so you change switches without a soldering iron. Keychron lists its Q4 as hot-swappable for 5-pin and 3-pin switches, while Cherry lists its G80-3000 as not hotswap, which means its switches are soldered.

Does a mechanical keyboard have RGB lighting?

Keyboards with RGB lighting use LEDs on the PCB that shine around or through the keycaps. Keychron lists south-facing RGB LEDs on its Q1 Max and north-facing LEDs on its K3 Max, and Cherry describes an MX RGB version whose lens set directs LED light into the keycap.

Head Crusher Gadget