# 4x12 Ortho Mechanical Keyboard

## Overview

https://youtu.be/Mo47fHAqNFQ

![](https://cdn-learn.adafruit.com/assets/assets/000/141/524/medium800/3d_printing_hero-hold.jpg?1765208666 )

Build a 4x12 key ortho linear mechanical keyboard powered by the Adafruit KB2040 running CircuitPython. You'll 3D print the enclosure to house the NeoKey ortho snap-apart PCBs and the Adafruit KB2040.

## KMK CircutPython Keyboard

[**Pog**](https://pog.heaper.de/) is an open source project that makes it easy to configure KMK (a user-friendly, feature-rich firmware for custom mechanical keyboards, built on CircuitPython) with a GUI key map editor with no code. The layout editor lets you create custom layouts and makes multi layers easy to set up.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/527/medium640/3d_printing_hero-POG.jpg?1765209638)

## Cute yet capable

With 48 keys in total, you can easily add multiple layers to expand your keycodes. The Pog software lets you create custom macros, strings, and even media/mouse controls. The Pog software also supports NeoPixel LEDs for basic keyboard backlighting.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/525/medium640/3d_printing_hero-hold-b.jpg?1765208923)

This guide covers how to build and assemble the 4x12 keyboard using two NeoKey 5x6 ortho snap-apart PCBs and how to use the POG software to set up and configure the key mapping.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/526/medium640/3d_printing_hero-mac.jpg?1765208971)

# Parts
Featured
### Adafruit KB2040 - RP2040 Kee Boar Driver

[Adafruit KB2040 - RP2040 Kee Boar Driver](https://www.adafruit.com/product/5302)
A wild Kee Boar appears! It’s a shiny **KB2040**! An Arduino Pro Micro-shaped board for Keebs with RP2040. (#keeblife 4 evah) A lot of folks like using Adafruit parts for their Keeb builds – but with the ItsyBitsy not being pin-compatible with the Pro Micro pinout, it...

In Stock
[Buy Now](https://www.adafruit.com/product/5302)
[Related Guides to the Product](https://learn.adafruit.com/products/5302/guides)
![Angled shot of short black microcontroller.](https://cdn-shop.adafruit.com/640x480/5302-07.jpg)

## 2x of NeoKey 5x6 Ortho Snap-Part PCBs
Featured
### NeoKey 5x6 Ortho Snap-Apart Mechanical Key Switches w/ NeoPixel

[NeoKey 5x6 Ortho Snap-Apart Mechanical Key Switches w/ NeoPixel](https://www.adafruit.com/product/5157)
For folks who want ready-to-go keeb action, we've got the lovely [Adafruit Macropad with a 3x4 grid of MX+NeoPixel key switches](https://www.adafruit.com/product/5100) - but for those who like to forge their own path, we now present the easiest way of creating custom ortholinear...

In Stock
[Buy Now](https://www.adafruit.com/product/5157)
[Related Guides to the Product](https://learn.adafruit.com/products/5157/guides)
![Top view video of a Black woman's hands pressing the key switches on to emit rainbow colors from the NeoPixels.](https://cdn-shop.adafruit.com/product-videos/640x480/5157-03.jpg)

## 4x of Kailh Key Switches

You can purchase cherry MX compatible key switches from Adafruit or from your favorite online vender.

Featured
### Kailh Mechanical Key Switches - Linear Black - 12 pack

[Kailh Mechanical Key Switches - Linear Black - 12 pack](https://www.adafruit.com/product/5876)
For crafting your very own custom keyboard, these **&nbsp;Kailh Black&nbsp;Linear mechanical key switches** &nbsp;are deeee-luxe! With smooth actuation and Cherry MX compatibility, they're lovely when you want a&nbsp; **smooth linear&nbsp;** keystroke with...

In Stock
[Buy Now](https://www.adafruit.com/product/5876)
[Related Guides to the Product](https://learn.adafruit.com/products/5876/guides)
![Angled shot of twelve black Kailh key switches.](https://cdn-shop.adafruit.com/640x480/5876-00.jpg)

## Key Caps

You can purchase clear blank keycaps from Adafruit or from a different vender. Search for sets of keycaps, there are even specialty caps designed for ortho linear keyboards.

### Part: Mac Style KOA Profile Keycaps
quantity: 1
138 Keys Cap Set used in this project.
[Mac Style KOA Profile Keycaps](https://www.amazon.com/dp/B0DGGV141F)

Featured
### Clear Keycaps for MX Compatible Switches - 12-pack

[Clear Keycaps for MX Compatible Switches - 12-pack](https://www.adafruit.com/product/5068)
Here is a **12&nbsp;pack** of Clear DSA keycaps for your next mechanical keyboard or&nbsp;[NeoKey](https://www.adafruit.com/?q=neokey&sort=BestMatch)&nbsp;project. Snap 'em onto any&nbsp; **Cherry MX or compatible switch&nbsp;** to turn your&nbsp;<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/5068)
[Related Guides to the Product](https://learn.adafruit.com/products/5068/guides)
![Group shot of Clear DSA Keycaps for MX Compatible Switches - 12 pack](https://cdn-shop.adafruit.com/640x480/5068-04.jpg)

## Hardware Fasteners

The following hardware fasteners are required for the assembly.

- 2x M3 x 4mm machine screws
- 10x M3 x 6mm machine screws
- 14x M3 x 8mm machine screws

# 4x12 Ortho Mechanical Keyboard

## Circuit Diagram

The diagram below provides a general visual reference for wiring of the components once you get to the **Assembly** page. This diagram was created using the software package [Fritzing](http://fritzing.org/download/).

## Adafruit Library for Fritzing

Adafruit uses the Adafruit Fritzing parts library to create circuit diagrams for projects. You can download the library or just grab individual parts. Get the library and parts from [GitHub - Adafruit Fritzing Parts](https://github.com/adafruit/Fritzing-Library/tree/master/parts).

![](https://cdn-learn.adafruit.com/assets/assets/000/142/323/medium800/led_matrices_circuit-diagram.jpg?1770835957 )

## Wired Connections

The NeoKey snap-part PCB comes as a 5x6 layout. The 5th row from each PCB is snapped-apart to create a 4x6 layout. The two 6x4 NeoKey ortho PCBs are wired together to create a 4x12 keyboard layout.&nbsp;

#### Column Pins

- **Column 1** &nbsp;to **A3** &nbsp;pin on **KB2040**
- **Column 2** to **A2** pin on **KB2040**
- **Column 3** to **A1** &nbsp;pin on **KB2040**
- **Column 4** &nbsp;to **A0** pin on **KB2040**
- **Column 5** to **SCK** pin on **KB2040**
- **Column 6** &nbsp;to **MISO** pin on **KB2040**
- **Column 7** to **D0** pin on **KB2040**
- **Column 8** to **D1** &nbsp;pin on **KB2040**
- **Column 9** &nbsp;to **D2** &nbsp;pin on **KB2040**
- **Column 10** to **D3** &nbsp;pin on **KB2040**
- **Column 11** to **D4** &nbsp;pin on **KB2040**
- **Column 12** to **D5** &nbsp;pin on **KB2040**

#### Row Pins

- **Row 1** to **D6** on **KB2040**
- **Row 2** &nbsp;to **D7** on **KB2040**
- **Row 3** to **D8** on **KB2040**
- **Row 4&nbsp;** to **D9** on **KB2040**

#### NeoPixel Pin

- **NeoPixel Input** pin to **MOSI** pin on **KB2040**

#### NeoKey Ortho Pins

The two NeoKey ortho snap-part PCBs are wired together by the **Row** , **Vin** , **GND** and **NeoPixel** data pins.

The&nbsp; **Adafruit KB2040** &nbsp;is powered via USB.

# 4x12 Ortho Mechanical Keyboard

## CircuitPython

[CircuitPython](https://github.com/adafruit/circuitpython) is a derivative of [MicroPython](https://micropython.org) designed to simplify experimentation and education on low-cost microcontrollers. It makes it easier than ever to get prototyping by requiring no upfront desktop software downloads. Simply copy and edit files on the **CIRCUITPY** drive to iterate.

## CircuitPython Quickstart

Follow this step-by-step to quickly get CircuitPython running on your board.

[Download the latest version of CircuitPython for this board via circuitpython.org](https://circuitpython.org/board/adafruit_kb2040/)
 **Click the link above to download the latest CircuitPython UF2 file.**

Save it wherever is convenient for you.

![install_circuitpython_on_rp2040_RP2040_UF2_downloaded.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/655/medium640/install_circuitpython_on_rp2040_RP2040_UF2_downloaded.jpg?1618943202)

![](https://cdn-learn.adafruit.com/assets/assets/000/108/852/medium800/adafruit_products_KeeBoar_boot_reset.jpg?1644515196)

To enter the bootloader, hold down the **BOOT/**** BOOTSEL button**(highlighted in red above), and while continuing to hold it (don't let go!), press and release the**reset button**(highlighted in red or blue above).&nbsp;**Continue to hold the BOOT/BOOTSEL button until the RPI-RP2 drive appears!**

If the drive does not appear, release all the buttons, and then repeat the process above.

You can also start with your board unplugged from USB, press and hold the BOOTSEL button (highlighted in red above), continue to hold it while plugging it into USB, and wait for the drive to appear before releasing the button.

A lot of people end up using charge-only USB cables and it is very frustrating! **Make sure you have a USB cable you know is good for data sync.**

You will see a new disk drive appear called **RPI-RP2**.

&nbsp;

Drag the **adafruit\_circuitpython\_etc.uf2** file to **RPI-RP2.**

![install_circuitpython_on_rp2040_RP2040_bootloader_drive.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/656/medium640/install_circuitpython_on_rp2040_RP2040_bootloader_drive.jpg?1618943666)

![install_circuitpython_on_rp2040_RP2040_drag_UF2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/657/medium640/install_circuitpython_on_rp2040_RP2040_drag_UF2.jpg?1618943674)

The **RPI-RP2** drive will disappear and a new disk drive called **CIRCUITPY** will appear.

That's it, you're done! :)

![install_circuitpython_on_rp2040_RP2040_CIRCUITPY.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/658/medium640/install_circuitpython_on_rp2040_RP2040_CIRCUITPY.jpg?1618943864)

## Safe Mode

You want to edit your **code.py** or modify the files on your **CIRCUITPY** drive, but find that you can't. Perhaps your board has gotten into a state where **CIRCUITPY** is read-only. You may have turned off the **CIRCUITPY** drive altogether. Whatever the reason, safe mode can help.

Safe mode in CircuitPython does not run any user code on startup, and disables auto-reload. This means a few things. First, safe mode _bypasses any code in_ **boot.py** (where you can set **CIRCUITPY** read-only or turn it off completely). Second, _it does not run the code in_ **code.py**. And finally, _it does not automatically soft-reload when data is written to the_ **CIRCUITPY** _drive_.

Therefore, whatever you may have done to put your board in a non-interactive state, safe mode gives you the opportunity to correct it without losing all of the data on the **CIRCUITPY** drive.

### Entering Safe Mode
To enter safe mode when using CircuitPython, plug in your board or hit reset (highlighted in red above). Immediately after the board starts up or resets, it waits 1000ms. On some boards, the onboard status LED (highlighted in green above) will blink yellow during that time. If you press reset during that 1000ms, the board will start up in safe mode. It can be difficult to react to the yellow LED, so you may want to think of it simply as a slow double click of the reset button. (Remember, a fast double click of reset enters the bootloader.)

### In Safe Mode

If you successfully enter safe mode on CircuitPython, the LED will intermittently blink yellow three times.

If you connect to the serial console, you'll find the following message.

```terminal
Auto-reload is off.
Running in safe mode! Not running saved code.

CircuitPython is in safe mode because you pressed the reset button during boot. Press again to exit safe mode.

Press any key to enter the REPL. Use CTRL-D to reload.
```

You can now edit the contents of the **CIRCUITPY** drive. Remember, _your code will not run until you press the reset button, or unplug and plug in your board, to get out of safe mode._

## Flash Resetting UF2

If your board ever gets into a really _weird_ state and CIRCUITPY doesn't show up as a disk drive after installing CircuitPython, try loading this 'nuke' UF2 to RPI-RP2. which will do a 'deep clean' on your Flash Memory. **You will lose all the files on the board** , but at least you'll be able to revive it! After loading this UF2, follow the steps above to re-install CircuitPython.

[Download flash erasing "nuke" UF2](https://cdn-learn.adafruit.com/assets/assets/000/101/659/original/flash_nuke.uf2?1618945856)
# 4x12 Ortho Mechanical Keyboard

## CAD Files

## 3D Printed Parts

Individual 3MF files for 3D printing are oriented and ready to print on FDM machines using PLA filament. Original design source may be downloaded using the links below.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/403/medium640/3d_printing_slice-parts.jpg?1764699158)

![](https://cdn-learn.adafruit.com/assets/assets/000/141/444/medium640/3d_printing_3d-parts.jpg?1764865492)

[Download 3MF.zip](https://cdn-learn.adafruit.com/assets/assets/000/141/541/original/3MF.zip?1765220883)
[Download CAD Source Files](https://cdn-learn.adafruit.com/assets/assets/000/141/542/original/CAD.zip?1765220906)
## CAD Assembly

The main assembly is available in Autodesk Fusion and STEP file formats. This includes all of the 3D printed parts and electronic components used in the project. Use the main assembly to create any edits, updates, or modifications.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/141/532/medium640/3d_printing_cad-exploded.jpg?1765211309)

## Build Volume

The parts require a 3D printer with a minimum build volume of 244 (X) x 92mm (Y) x 15mm (Z).

![](https://cdn-learn.adafruit.com/assets/assets/000/141/533/medium640/3d_printing_bed-size.jpg?1765211422)

## Design Source Files

The project assembly was designed in Fusion 360. Once opened in Fusion 360, It can be exported in different formats like STEP, STL and more.

Electronic components like Adafruit's boards, displays, connectors and more can be downloaded from the&nbsp;[Adafruit CAD parts GitHub Repo](https://github.com/adafruit/Adafruit_CAD_Parts/).

![](https://cdn-learn.adafruit.com/assets/assets/000/141/534/medium640thumb/3d_printing_5302-KB2040.jpg?1765211486)

# 4x12 Ortho Mechanical Keyboard

## Wiring Assembly

Danger: PCBs contain fiberglass which is hazardous to your health. Wear a facemask when filing or sanding the edges.

## Ortho Snap-Part PCB Prep

Start by removing the top and bottom railing bits from both sheets. Use some pliers to gently bend at the perforation until the extra material snaps off.

Remove the 5th row from the two sheets using pliers to create two sets of 4x6 PCBs that look like the image below in the wiring section. (That's 4 rows, 6 columns).

Clean the edges from the top and bottom of the PCB using sandpaper or a metal file.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/446/medium640/3d_printing_remove-rails.jpg?1764865942)

![](https://cdn-learn.adafruit.com/assets/assets/000/141/447/medium640/3d_printing_rails-removed.jpg?1764865950)

## Wire PCBs

Start by wiring up the two 4x6 PCBs together. Use short wires, about 1 inch (25mm), connect the **ROW** , **VIN** , **Ground(GND)** and **NeoPixel**  **data**  **OUT/IN** pins.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/564/medium640/led_matrices_wired-PCBs.jpg?1765291561)

## Wiring The KB2040

Place the KB2040 microcontroller in the center above two 4x6 PCBs. Create wires with appropriate lengths for&nbsp; **VIN** and **GND** pins from right side PCB to the KB2040. Solder the wires to the pins. Then, solder the&nbsp; **VIN** wire to the **RAW** pin and **GND** to **GND**.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/559/medium640/led_matrices_kb-vc-gnd.jpg?1765291124)

Create a wire with an appropriate length for the first NeoPixel LED (the top right) to connect to the **MOSI** pin on the KB2040. Solder the wire from the NeoPixel **Data In** pin to the **MOSI** pin on the KB2040.

&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/141/560/medium640/led_matrices_kb-di-mosi.jpg?1765291202)

Create four wires, with varying lengths, to connect the rows to the accompanying pins on the KB2040. Solder the wires, going from top to bottom, to the&nbsp; **D6** , **D7** , **D8** and **D9** pins respectively.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/561/medium640/led_matrices_kb-rows-pins.jpg?1765291270)

Create 6 wires, with varying length, to connect the columns on the right-half PCB to the accompanying pins on the KB2040. Solder the wires, going from left to right, **A3** , **A2** , **A1** , **A0** ,&nbsp; **CLK** , and **MISO** pins.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/562/medium640/led_matrices_kb-cols-side-A.jpg?1765291470)

Create 6 more wires, in varying lengths, to connect the columns on the left-half PCB to the accompanying pins on the KB2040. Solder the wires, going from left to right, **TX** , **RX,**  **D2** , **D3** , **D4** , and **D5** pins.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/563/medium640/led_matrices_kb-cols-side-b.jpg?1765291497)

## Install KB2040 Holder

Orient the KB2040 with the 3D printed holder. Then, insert the board at an angle so the edge of the PCB fits under the corner clips.

Slightly flex the holder to allow the other side of the PCB to fit under the clips.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/448/medium640/3d_printing_kb2040-installing-holder.jpg?1764868939)

![](https://cdn-learn.adafruit.com/assets/assets/000/141/449/medium640/3d_printing_kb2040-installed-holder.jpg?1764868947)

## Install NeoKey Mount

Orient the NeoKey PCBs with the 3D printed mount. Slide the mount in between the KB2040 mount and the NeoKey PCBs.

Line up the KB2040 holder mounting holes with the accompanying holes on the NeoKey mount.

Insert and fasten 2x M3 x 4mm long machine screws to secure the KB2040 holder to the NeoKey mount.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/490/medium640/3d_printing_pcb-mount.jpg?1764944354)

![](https://cdn-learn.adafruit.com/assets/assets/000/141/491/medium640/3d_printing_kb-pcb-mount-installing.jpg?1764944382)

![](https://cdn-learn.adafruit.com/assets/assets/000/141/492/medium640/3d_printing_kb-pcb-mount-fasten.jpg?1764944425)

## Installing NeoKey PCBs

Flip the assembly over and position the two NeoKey PCBs so the mounting holes are lined up with the various mounting points on the 3D printed mount.

Ensure various wires are positioned away from any of the mounting holes.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/455/medium640/3d_printing_nk-mount-installing.jpg?1764873859)

## Fasten & Secure NeoKey PCBs

While holding the NeoKey PCBs in place, insert and fasten the M3 x 6mm machine screws.

Reference the assembly photo to cross check where the 10x M3 screws are needed to be fastened.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/456/medium640/3d_printing_nk-mount-fastening.jpg?1764873913)

![](https://cdn-learn.adafruit.com/assets/assets/000/141/457/medium640/3d_printing_nk-mount-fastened.jpg?1764873938)

![](https://cdn-learn.adafruit.com/assets/assets/000/141/458/medium640/3d_printing_nk-mount-screw-points.jpg?1764873964)

## Check Wiring

Flip the assembly over and double check the wires are not being obstructed and clear from any pinching or kinking.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/459/medium640/3d_printing_nk-mount-pcb-secured.jpg?1764874062)

## Install Bottom

Orient the bottom half of the case with the NeoKey PCB assembly.

Insert the NeoKey PCB assembly into the bottom half of the case with the mounting holes lined up.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/468/medium640/3d_printing_pcb-mount-bottom-preinstall.jpg?1764875887)

![](https://cdn-learn.adafruit.com/assets/assets/000/141/469/medium640/3d_printing_pcb-mount-bottom-installing.jpg?1764876069)

![](https://cdn-learn.adafruit.com/assets/assets/000/141/470/medium640/3d_printing_pcb-mount-bottom-installed.jpg?1764876108)

## Secure PCB Mount to Bottom

Insert and fasten M3x8mm long machine screws to secure the NeoKey PCB mount to the bottom half of the enclosure.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/471/medium640/3d_printing_bottom-pcb-fasten.jpg?1764876280)

![](https://cdn-learn.adafruit.com/assets/assets/000/141/472/medium640/3d_printing_bottom-pcb-fastening.jpg?1764876288)

![](https://cdn-learn.adafruit.com/assets/assets/000/141/473/medium640/3d_printing_bottom-pcb-secured.jpg?1764876312)

## Installing Switches to Key Plate

Get the 3D printed key plate and 48x mechanical key switches ready to install. Orient the key plate with the NeoKey PCB (the center tab faces away from KB2040's USB port).

Start by inserting switches on each corner of the key plate by snapping them into the plate. Make sure they're in the correct orientation (LED slots facing down).

Then, insert four more switches spaced apart like in the assembly photo.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/474/medium640/3d_printing_kplate-switches.jpg?1764876532)

![](https://cdn-learn.adafruit.com/assets/assets/000/141/475/medium640/3d_printing_kplate-switches-install.jpg?1764876542)

![](https://cdn-learn.adafruit.com/assets/assets/000/141/476/medium640/3d_printing_kplate-switches-installing.jpg?1764876554)

## Install Key Plate to NeoKey PCBs

Orient the key plate with the NeoKey PCBs and place it over the PCB.

Gently press down the various switches, ensuring the pins are fitting neatly into their respected sockets.&nbsp;

Proceed with the switch installation by snapping switches into place, one by one, ensuring the pins are seating correctly into the key sockets.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/477/medium640/3d_printing_kplate-pcb-install.jpg?1764877007)

![](https://cdn-learn.adafruit.com/assets/assets/000/141/478/medium640/3d_printing_kplate-pcb-press.jpg?1764877036)

![](https://cdn-learn.adafruit.com/assets/assets/000/141/479/medium640/3d_printing_kplate-keys-installed.jpg?1764877064)

## Install Key Caps

Gather up your desired key caps to get ready to install them onto the mechanical key switches.

Pull up your key map to reference the placement of the key caps.

Firmly press the key caps onto the stems of the key switches to install them.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/493/medium640/3d_printing_keycaps.jpg?1764947783)

![](https://cdn-learn.adafruit.com/assets/assets/000/141/494/medium640/3d_printing_keycap-install.jpg?1764947952)

![](https://cdn-learn.adafruit.com/assets/assets/000/141/495/medium640/3d_printing_keycaps-installing.jpg?1764947967)

## Installed Key Caps

Take a moment to review each key switch, making sure they match your key mapping.

If you find a key is misplaced, use a key puller to remove the key cap.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/496/medium640/3d_printing_keycaps-installed.jpg?1764948055)

## Install Top

Orient the top cover with bottom half of the case so the snap fit nubs match.

Firmly press the two parts together to snap fit them closed.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/497/medium640/3d_printing_top-installing.jpg?1764948328)

![](https://cdn-learn.adafruit.com/assets/assets/000/141/498/medium640/3d_printing_top-installed.jpg?1764948751)

## USB, Reset & Boot

Connect your keyboard to your computer using a data and power USB-C cable.

The bottom of the enclosure features button tabs for accessing the boot and reset buttons on the KB2040. The square shaped button is BOOT while the circular one is the RESET button.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/500/medium640/3d_printing_usb-cable.jpg?1764948849)

![](https://cdn-learn.adafruit.com/assets/assets/000/141/501/medium640/3d_printing_bottom-reset-boot.jpg?1764948902)

Plug your keyboard into your computer and type away!

![](https://cdn-learn.adafruit.com/assets/assets/000/141/499/medium800/3d_printing_final-assembly.jpg?1764948817 )

# 4x12 Ortho Mechanical Keyboard

## POG Software Setup

Primary: Once CircuitPython is installed on your KB2040, the next step is to download the POG desktop application. Make sure your KB2040 is connected to your computer and the CIRCUITPY drive is mounted on your desktop and visible in Finder or File Explorer (depending on your operating system).

## Download POG V2.2.0

Click the link below to open the POG github repo in your web browser.

Locate the desktop application appropriate for your computers operating system and download the asset.

&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/141/502/medium640/3d_printing_POG-github.jpg?1764952838)

[Download POG V2.2.0](https://github.com/JanLunge/pog/releases/tag/v2.2.0)
Warning: For macOS, right-click on the POG app and select open, then goto System Settings app. Under the Privacy & Security section, scroll down and locate security, click Pog – Open Anyway to allow the POG app to open.

## Setup New Keyboard

Click New Keyboard button to start the setup process.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/504/medium640/3d_printing_setup-new-keeb.jpg?1764953440)

## Select your CIRCUITPY drive

Click on **CIRCUITPY** and click continue.

On the setup method page, click on the USB serial port button and then click on **Manual Setup**.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/505/medium640/3d_printing_CP-setup.jpg?1764953949)

![](https://cdn-learn.adafruit.com/assets/assets/000/141/506/medium640/3d_printing_manual-setup.jpg?1764954082)

## Initial Keyboard Setup

On the next page, click **INSTALL** KMK and wait for the KMK checkmark to appear. In the background, POG will automatically download the latest version of KMK to your **CIRCUITPY** drive.

Click **NEXT** when KMK is finished installing.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/507/medium640/3d_printing_step-1.jpg?1764954213)

## Name Your Keyboard

On this page, you will enter the name and any additional meta data you want to associate to your keyboard.

Click **NEXT** when you're ready to proceed.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/508/medium640/3d_printing_step-2.jpg?1764954324)

## Matrix Setup

On the Matrix page, choose **normal** for keyboard type, **matrix** for matrix method and enter **12** for matrix width, and **4** for matrix height. Scroll down to see a visual preview of your keyboard layout.

Click **NEXT** when ready.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/513/medium640/3d_printing_step-3.jpg?1764954420)

## Pin Setup

On the pins page, select **board** for Pin Prefix. Select **ROW2COL** under the Diode Direction. Then, enter the following pins for the rows and columns.

#### Row Pins (4)

- D6
- D7
- D8
- D9

#### Column Pins (12)

- A3
- A2
- A1
- A0
- SCK
- MISO
- D0
- D1
- D2
- D3
- D4
- D5

Double check all of the pins are correctly entered. Click **NEXT** when ready.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/514/medium640/3d_printing_step-4.jpg?1764954543)

## Coordmap Setup

On the Coordmap setup page, click on the **FLASH COORDMAP FINDER TO KEYBOARD** button.

Then, click on the text area and follow the guide instructions on the page.

Click **NEXT** when ready.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/515/medium640/3d_printing_step-5.jpg?1764954794)

![](https://cdn-learn.adafruit.com/assets/assets/000/141/516/medium640/3d_printing_step5-B.jpg?1764954938)

## Finish Initial Setup

Review your keyboard layout making sure the key numbers look correct.

Click **FINISH SETUP** when ready.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/517/medium640/3d_printing_step-6.jpg?1764955009)

# 4x12 Ortho Mechanical Keyboard

## Keymap Setup

## Mapping Keys

After the initial setup is complete, you can start mapping keys to your keyboard.

In the **keymap** section, you'll see a visualization of your keyboard layout. Click on a key in the layout to highlight it, then you can click on a **keycode** in the QWERTY section to map it.

Click the gear icon to reveal settings for Auto-select next key.

For **media control** keycodes, select **App/Media/Mouse** in the lower menu to show additional keycodes.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/518/medium640/3d_printing_keymap-setup.jpg?1764956976)

## Adding Layers

You can add an extra layer to your keymap by clicking on the **ADD LAYER** button in the upper menu.

Click on the gear icon next to the newly added layer to add name and optionally assign a color.&nbsp;

Click on the **"0"** layer and choose a key to toggle the second layer using the **MO(1)** keycode under Layers in the lower menu. This will allow you to hold down that selected key and press the corresponding key. For example. If press and hold down on the lowest far left key and then press Q, it will type out a 1.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/519/medium640/3d_printing_keymap-add-layer.jpg?1764957364)

![](https://cdn-learn.adafruit.com/assets/assets/000/141/520/medium640/3d_printing_keymap-layer-toggle.jpg?1764957757)

## Adding RGB Backlighting

You can turn on the NeoPixel LEDs on your keyboard.

In the side menu, click on **RGB** to and check **Enable RGB**. Then, enter **board.MOSI** in the RGB Pin section. Enter **48** in the Number of LEDs.

Choose your desired mode under the Animation Mode. Then, choose your preferred color by clicking on the colored box to open a color picker.

You have the option to toggle the LEDs on/off and adjust the hue using keys by choosing from the **RGB** menu under the **Keymap** page.

![](https://cdn-learn.adafruit.com/assets/assets/000/141/521/medium640/3d_printing_enable-RGB.jpg?1764957897)

Info: Click on the big orange save icon button (top right of the window) to save your settings and reload your keyboard.

For additional documentation, reporting bugs or feature requests, check out the GitHub page linked below.

[POG on Github](https://github.com/JanLunge/pog)

## Guide Products

### Adafruit KB2040 - RP2040 Kee Boar Driver

[Adafruit KB2040 - RP2040 Kee Boar Driver](https://www.adafruit.com/product/5302)
A wild Kee Boar appears! It’s a shiny **KB2040**! An Arduino Pro Micro-shaped board for Keebs with RP2040. (#keeblife 4 evah) A lot of folks like using Adafruit parts for their Keeb builds – but with the ItsyBitsy not being pin-compatible with the Pro Micro pinout, it...

In Stock
[Buy Now](https://www.adafruit.com/product/5302)
[Related Guides to the Product](https://learn.adafruit.com/products/5302/guides)
### NeoKey 5x6 Ortho Snap-Apart Mechanical Key Switches w/ NeoPixel

[NeoKey 5x6 Ortho Snap-Apart Mechanical Key Switches w/ NeoPixel](https://www.adafruit.com/product/5157)
For folks who want ready-to-go keeb action, we've got the lovely [Adafruit Macropad with a 3x4 grid of MX+NeoPixel key switches](https://www.adafruit.com/product/5100) - but for those who like to forge their own path, we now present the easiest way of creating custom ortholinear...

In Stock
[Buy Now](https://www.adafruit.com/product/5157)
[Related Guides to the Product](https://learn.adafruit.com/products/5157/guides)
### Kailh Mechanical Key Switches - Linear Black - 12 pack

[Kailh Mechanical Key Switches - Linear Black - 12 pack](https://www.adafruit.com/product/5876)
For crafting your very own custom keyboard, these **&nbsp;Kailh Black&nbsp;Linear mechanical key switches** &nbsp;are deeee-luxe! With smooth actuation and Cherry MX compatibility, they're lovely when you want a&nbsp; **smooth linear&nbsp;** keystroke with...

In Stock
[Buy Now](https://www.adafruit.com/product/5876)
[Related Guides to the Product](https://learn.adafruit.com/products/5876/guides)
### Clear Keycaps for MX Compatible Switches - 12-pack

[Clear Keycaps for MX Compatible Switches - 12-pack](https://www.adafruit.com/product/5068)
Here is a **12&nbsp;pack** of Clear DSA keycaps for your next mechanical keyboard or&nbsp;[NeoKey](https://www.adafruit.com/?q=neokey&sort=BestMatch)&nbsp;project. Snap 'em onto any&nbsp; **Cherry MX or compatible switch&nbsp;** to turn your&nbsp;<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/5068)
[Related Guides to the Product](https://learn.adafruit.com/products/5068/guides)

## Related Guides

- [Adafruit NeoKey 5x6 Ortho Snap-Apart](https://learn.adafruit.com/adafruit-neokey-5x6-ortho-snap-apart.md)
- [Adafruit KB2040](https://learn.adafruit.com/adafruit-kb2040.md)
- [See N Say Brain Transplant](https://learn.adafruit.com/see-n-say-brain-transplant.md)
- [Cyber Cat MIDI Keyboard](https://learn.adafruit.com/midi-cyber-cat-keyboard.md)
- [Super Nintendo USB Controller](https://learn.adafruit.com/super-nintendo-usb-controller.md)
- [16-Step Drum Sequencer](https://learn.adafruit.com/16-step-drum-sequencer.md)
- [Numpad 4000 Mechanical Keyswitch Data Entry Device](https://learn.adafruit.com/numpad-4000-mechanical-keyswitch-data-entry-device.md)
- [Dragon Drop: a CircuitPython Game for MacroPad](https://learn.adafruit.com/dragon-drop-a-circuitpython-game-for-macropad.md)
- [Motorized Camera Slider 2-Axis](https://learn.adafruit.com/motorized-camera-slider-2-axis.md)
- [Deluxe 4x4 NeoPixel Keypad](https://learn.adafruit.com/deluxe-4x4-neopixel-neokey-keypad.md)
- [Fisher-Price USB Controller](https://learn.adafruit.com/fisher-price-usb-controller.md)
- [PB Gherkin 30% keyboard with KMK, CircuitPython, & KB2040](https://learn.adafruit.com/pb-gherkhin-30-keyboard-with-kmk-circuitpython-kb2040.md)
- [Pokémon Macro Ball for Nintendo Switch](https://learn.adafruit.com/pokemon-macro-ball-for-nintendo-switch.md)
- [DOOM Keeb](https://learn.adafruit.com/doom-keeb.md)
- [Ableton Live MacroPad Launcher](https://learn.adafruit.com/ableton-live-macropad-launcher.md)
- [Fisher-Price USB Foot Pedal](https://learn.adafruit.com/fisher-price-usb-foot-pedal.md)
- [Breakbeat Breadboard](https://learn.adafruit.com/breakbeat-breadboard.md)
