# Numpad 4000 Mechanical Keyswitch Data Entry Device

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/103/976/medium800/3d_printing_nump4k-2408b.jpg?1629136818)

Compact keyboards are super cool -- I use a [TKL](https://keyboard.university/100-courses/keyboard-sizes-layouts) -- but sometimes you just miss having a big, old number pad for data entry and calculations. The Numpad 4000 is just that! Plus, you can move it off to either side of your main keyboard for ideal ergonomics.

You can build the custom mechanical Number Pad of your Dreams with the Ortho NeoKey Snap-Apart PCB, a Feather RP2040, and CircuitPython. Customize the physical layout on this diode-matrixed, NeoPixel-lit wonder board!

## Parts
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)

This project should work well on nearly any CircuitPython-capable Feather board. I chose to use the very lovely Feather RP2040.

Featured
### Adafruit Feather RP2040

[Adafruit Feather RP2040](https://www.adafruit.com/product/4884)
A new chip means a new Feather, and the Raspberry Pi RP2040 is no exception. When we saw this chip we thought "this chip is going to be awesome when we give it the Feather Treatment" and so we did! This Feather features the&nbsp; **RP2040** , and all niceties you know and...

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

### Key Switches and Keycaps

The NeoKey Ortho 5x6 PCB uses up to 30 keyswitches and key caps, although for the Numpad 4000 you'll only need 22.

Featured
### Kailh Mechanical Key Switches - Thick Click Jade Box - 10 pack

[Kailh Mechanical Key Switches - Thick Click Jade Box - 10 pack](https://www.adafruit.com/product/5149)
For crafting your very own custom keyboard, these **&nbsp;Kailh Clicky Jade mechanical key switches** &nbsp;are deeee-luxe! With smooth actuation and Cherry MX compatibility, they're lovely when you want a **'thick' and satisfying clicky...**

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

Featured
### Kailh Mechanical Key Switches - 10 packs - Cherry MX Compatible

[Kailh Mechanical Key Switches - 10 packs - Cherry MX Compatible](https://www.adafruit.com/product/4996)
For crafting your very own custom keyboard, these **&nbsp;Kailh mechanical key switches** &nbsp;are deeee-luxe!

Come&nbsp;in a pack of 10 switches, plenty to make a small keyboard, or grab a few packs to build a full keyboard.

- Use these with our&nbsp;<a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/4996)
[Related Guides to the Product](https://learn.adafruit.com/products/4996/guides)
![Top down view of four piles of Kailh key switches in Red, Black, Brown, and Black variations.](https://cdn-shop.adafruit.com/640x480/4996-00.jpg)

## Keycaps

To build the Numpad 4000 as designed here you'll need a set of number pad-specific keys. I used [SA profile, double-shot Maxkey keycaps](https://kbdfans.com/collections/sa-profile/products/maxkey-sa-ocean-keycaps-set) -- these numberpad keys happened to be left over from a TKL (ten key-less) build I did. Talk to a friend who has ordered some fancy keycaps before -- in many cases they'll have left over numpad keys as people tend to make smaller boards!

Or, go for a fully orthographic build using 1u keycaps such as these DSA profile ones:

Featured
### Black DSA Keycaps for MX Compatible Switches - 10 pack

[Black DSA Keycaps for MX Compatible Switches - 10 pack](https://www.adafruit.com/product/4997)
Dress up your mechanical keys in your favorite colors, with a wide selection of stylish DSA key caps. Here is a 10 pack of Adafruit black DSA keycaps for your next mechanical keyboard or&nbsp;[NeoKey](https://www.adafruit.com/?q=neokey&sort=BestMatch)&nbsp;project. Snap 'em...

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

Featured
### Woven USB Cable with USB Type A to Right Angle USB Type C

[Woven USB Cable with USB Type A to Right Angle USB Type C](https://www.adafruit.com/product/5031)
Some days we're feeling extra fancy here at the 'fruit warehouse, and we have a big soft spot for woven fabric cables. Like, peep [this fully reversible pink/purple Blinka-inspired cable](https://www.adafruit.com/product/4111)&nbsp;or <a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/5031)
[Related Guides to the Product](https://learn.adafruit.com/products/5031/guides)
![Top shot of  right angle USB C to A woven 1m length black](https://cdn-shop.adafruit.com/640x480/5031-07.jpg)

Featured
### Black Nylon Machine Screw and Stand-off Set – M2.5 Thread

[Black Nylon Machine Screw and Stand-off Set – M2.5 Thread](https://www.adafruit.com/product/3299)
Totaling 380 pieces, this **M2.5 Screw Set** &nbsp;is a must-have for your workstation.&nbsp;You'll have enough screws, nuts, and hex standoffs to fuel your maker tendencies&nbsp;for days on end! M2.5 size screws fit almost all of the Adafruit breakout/dev board mounting holes...

In Stock
[Buy Now](https://www.adafruit.com/product/3299)
[Related Guides to the Product](https://learn.adafruit.com/products/3299/guides)
![Black Nylon Screw and Stand-off Set with M2.5 Threads, kit box](https://cdn-shop.adafruit.com/640x480/3299-00.jpg)

Featured
### Little Rubber Bumper Feet - Pack of 4

[Little Rubber Bumper Feet - Pack of 4](https://www.adafruit.com/product/550)
Keep your electronics from going barefoot, give them little rubber feet! These small sticky bumpers are our favorite accessory for any electronic kit or device. They are sticky, but not impossible to remove. They're small enough to fit onto any board, and have just enough height to give...

In Stock
[Buy Now](https://www.adafruit.com/product/550)
[Related Guides to the Product](https://learn.adafruit.com/products/550/guides)
![Angled Shot of the Little Rubber Bumper Feet - Pack of 4](https://cdn-shop.adafruit.com/640x480/550-06.jpg)

## M2.5 x 18mm Screws x3

[These ones](https://www.mcmaster.com/screws/socket-head-screws/system-of-measurement~metric/thread-size~m2-5/length~18mm/) from McMaster-Carr are nice.

![3d_printing_screw.png](https://cdn-learn.adafruit.com/assets/assets/000/103/975/medium640/3d_printing_screw.png?1629135893)

## Tools and Materials

You'll need a 3D printer and filament to build the switch plate and case. Alternately, you can make a variant stacked design using acrylic or wood on a laser cutter or mill, or even with chipboard and a CNC cutter such as the Cricut.

You'll also need a soldering iron, solder, and thin wire such as this:

Featured
### Silicone Cover Stranded-Core Wire - 30AWG in Various Colors

[Silicone Cover Stranded-Core Wire - 30AWG in Various Colors](https://www.adafruit.com/product/2051)
Silicone-sheathing wire is super-flexible and soft, and its also strong! Able to handle up to 200°C and up to 600V, it will do when PVC covered wire wimps out. We like this wire for being extremely supple and flexible, so it is great for wearables or projects where the wire-harness has to...

Out of Stock
[Buy Now](https://www.adafruit.com/product/2051)
[Related Guides to the Product](https://learn.adafruit.com/products/2051/guides)
![Silicone Cover Stranded-Core Wire - 30AWG in Various Colors laid out beside each other. ](https://cdn-shop.adafruit.com/640x480/2051-01.jpg)

# Numpad 4000 Mechanical Keyswitch Data Entry Device

## Numpad Layout

![](https://cdn-learn.adafruit.com/assets/assets/000/103/838/medium800/3d_printing_keycapsizes.jpg?1628888109 Keycaps come in many sizes)

Not all keycaps are square. Keycap ratios are expressed as proportional widths relative to a "one unit", or, "1u" standard, which you find on most of the "normal" alpha-numeric keys on a keyboard.

Other key sizes exist: modifiers are usually 125% width, or 1.25u. Here are some common sizes (these may vary with different designs):

- "normal" keys = 1u
- `alt`, `ctrl` = 1.25u
- `tab` = 1.5u
- `caps lock` = 1.75u
- `numpad 0`, `+`, `enter` = 2u
- `spacebar` = 6.25u

Here's a nice resource for learning more about keyboard anatomy, [Keyboard University](https://keyboard.university/100-courses/keycaps-101).

![3d_printing_tkc.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/839/medium640/3d_printing_tkc.jpg?1628891134)

## Getting Off the Grid

Since this design uses a few 2u keycaps, we'll need to move some of the NeoKey snap-apart PCBs off of the default 1u grid.

The NeoKey Ortho 6x5 Snap-Apart PCB makes it easy to rearrange the layout.

To keep things neat and stable, you can design a key plate for 3D printing, laser cutting, or CNC milling.

An excellent tool for designing your layout in the browser is the [Keyboard Layout Editor](http://www.keyboard-layout-editor.com/#/).

## Keyboard Layout Editor

An excellent tool for designing your layout in the browser is the [Keyboard Layout Editor](http://www.keyboard-layout-editor.com/#/).

You can start a new, blank layout, then add keys and rearrange their sizes and positions using the per-key controls.

![3d_printing_KLE2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/846/medium640/3d_printing_KLE2.jpg?1629124189)

Using the Keyboard Layout Editor I created the layout I want.

![](https://cdn-learn.adafruit.com/assets/assets/000/103/840/medium800/3d_printing_kle.jpg?1628896721)

Once the layout is set, I headed to the Raw Data tab to copy the markup text shown here:

```auto
[{c:"#606cc4",t:"#ffffff",p:"DSA",a:5,f:4},"NUM\n\n\n\n\n\nLOCK",{a:7,f:6},"DEL",{f:9},"/","*","-"],
[{a:5,f:4},"PAGE\n\n\n\n\n\nUP",{c:"#408dff",a:7,f:9},"7","8","9",{c:"#606cc4",h:2,_s:0},"+"],
[{a:5,f:3},"PAGE\n\n\n\n\n\nDOWN",{c:"#408dff",a:7,f:9},"4","5","6"],
[{c:"#606cc4",f:6},"FN",{c:"#408dff",f:9},"1","2","3",{c:"#606cc4",f:3,h:2,_s:0},"ENTER"],
["CTRL",{c:"#408dff",f:9,w:2,_s:0},"0","."]
```

Highlight and copy the markup text so you can use it in the next step.

Primary: 

## Plate & Case Builder

Now that you have the keyboard laid out, you can use the [swillkb Plate & Case Builder](http://builder.swillkb.com/) to generate the CAD drawings of your plate layout.

Paste the markup text from the Raw Data you copied in the Keyboard Layout Editor in to the Plate Layout field. Pick and options you want, and then click the **Draw My CAD!!!** button.

![](https://cdn-learn.adafruit.com/assets/assets/000/103/841/medium800/3d_printing_swillkb.jpg?1628897089)

Pick the **CAD Output** tab and you'll see your drawing.

![](https://cdn-learn.adafruit.com/assets/assets/000/103/842/medium800/3d_printing_swillkb2.jpg?1628897291)

Click on the file type button to download an SVG, DXF, or EPS file of the drawing. You'll use this in your 3D modeling package of choice, or to generate a laser cutter or CNC toolpath.

[numpad4k.svg](https://cdn-learn.adafruit.com/assets/assets/000/103/847/original/numpad4k.svg?1629124632)
## Model

Most 3D modeling and CAD programs will allow you to import the drawing file of your choice. I used the venerable .dxf file and imported it into Rhino/Grasshopper.

I then created a Grasshopper workflow to effectively extrude the collection of curves 1.6mm in height to generate the switch plate model. (I also had it offset the outer boundary curve by 2mm and fillet the corners.)

The 1.6mm plate height is a good starting point, allowing the switches to click into place nicely, but you can try making it thicker if you like.

![](https://cdn-learn.adafruit.com/assets/assets/000/103/843/medium800/3d_printing_rhino.jpg?1628898247)

Export the model as an .stl file and 3D print it! (Note, the print shown here was made using the notched keyswitch profile, but the squares work just as well or better due to increased connection surface.)

![](https://cdn-learn.adafruit.com/assets/assets/000/103/844/medium800/3d_printing_nump4k-2453.jpg?1628898894)

# Numpad 4000 Mechanical Keyswitch Data Entry Device

## Assemble the Numpad

## Snap

The first step is to snap off the top and bottom of the PCB.

Use some pliers to gently bend at the perforation until the extra material snaps off.

![3d_printing_nump4k-2456.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/848/medium640/3d_printing_nump4k-2456.jpg?1629124869)

![3d_printing_nump4k-2460.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/849/medium640/3d_printing_nump4k-2460.jpg?1629124881)

Warning: 

![](https://cdn-learn.adafruit.com/assets/assets/000/103/852/medium800/3d_printing_nump4k-2462.jpg?1629124896)

## Extra Column No More

Pry off the extra column at the far right of the board, as seen from the top side of the PCB.

You can save these key PCBs for use in another project later, such as a five-key macro strip!

![3d_printing_nump4k-2464.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/853/medium640/3d_printing_nump4k-2464.jpg?1629124970)

![3d_printing_nump4k-2465.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/854/medium640/3d_printing_nump4k-2465.jpg?1629124977)

## Snip Snip

Use diagonal cutters to cut off the four key PCBs of the fifth column as shown, taking care to leave the first PCB in place.

Then, snap off two of the four key PCBs you just removed and reserve them for use with the `+` and `ENTER` keys later in the build.

You will eventually wire and solder these loose PCBs back into the numpad matrix.

![3d_printing_nump4k-2467.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/855/medium640/3d_printing_nump4k-2467.jpg?1629125084)

![3d_printing_nump4k-2468.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/856/medium640/3d_printing_nump4k-2468.jpg?1629125093)

![3d_printing_nump4k-2469.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/857/medium640/3d_printing_nump4k-2469.jpg?1629125189)

## More Snip Snip

Repeat the previous process to turn the bottom row of four into a spaced out row of three that will accommodate the 2u spacing of the `0` key.

![3d_printing_nump4k-2470.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/858/medium640/3d_printing_nump4k-2470.jpg?1629125219)

![3d_printing_nump4k-2471.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/859/medium640/3d_printing_nump4k-2471.jpg?1629125226)

![3d_printing_nump4k-2472.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/860/medium640/3d_printing_nump4k-2472.jpg?1629125234)

![3d_printing_nump4k-2473.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/861/medium640/3d_printing_nump4k-2473.jpg?1629125244)

This is the fundamental numpad layout you'll be working with. Next we'll clean up the board edges.

![](https://cdn-learn.adafruit.com/assets/assets/000/103/870/medium800/3d_printing_nump4k-2474.jpg?1629125453)

Danger: 

## Edge Cleanup

Use your diagonal cutters to remove some of the excess material where the boards were separated, then file them down with a small metal file or sandpaper.

Be sure not to breathe in the dust!

![3d_printing_nump4k-2475.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/874/medium640/3d_printing_nump4k-2475.jpg?1629125616)

![3d_printing_nump4k-2476.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/875/medium640/3d_printing_nump4k-2476.jpg?1629125624)

![](https://cdn-learn.adafruit.com/assets/assets/000/103/889/medium800/3d_printing_nump4k-2477.jpg?1629125706)

## 3D Case

Use the files linked below and print the plate, top, base, and bottom parts.

![3d_printing_printparts.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/974/medium640/3d_printing_printparts.jpg?1629135623)

[Numpad 4000 Case Files](https://www.thingiverse.com/thing:4934096)
## Keyswitches, Plate, PCBs

Arrange the PCBs as shown, then snap a few keyswitches into place.

Be careful to align the two metal legs of the keyswitch with the sockets of the PCBs.

![3d_printing_nump4k-2479.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/892/medium640/3d_printing_nump4k-2479.jpg?1629127330)

![3d_printing_nump4k-2480.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/893/medium640/3d_printing_nump4k-2480.jpg?1629127337)

![3d_printing_nump4k-2481.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/894/medium640/3d_printing_nump4k-2481.jpg?1629127344)

![3d_printing_nump4k-2482.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/895/medium640/3d_printing_nump4k-2482.jpg?1629127352)

## One Offs

For the 2u spaced keys, snap the keyswitches through the plate, then press the PCBs on from the back.

![3d_printing_nump4k-2488.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/899/medium640/3d_printing_nump4k-2488.jpg?1629127479)

![3d_printing_nump4k-2483.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/896/medium640/3d_printing_nump4k-2483.jpg?1629127435)

![3d_printing_nump4k-2486.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/897/medium640/3d_printing_nump4k-2486.jpg?1629127461)

![3d_printing_nump4k-2487.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/898/medium640/3d_printing_nump4k-2487.jpg?1629127471)

![](https://cdn-learn.adafruit.com/assets/assets/000/103/908/medium800/3d_printing_nump4k-2489.jpg?1629127679)

## Wiring

It's time to wire it all up! There are two sets of wiring tasks here -- one is to connect the key matrix column and row pins to the Feather RP2040 as well as the power, ground and NeoPixel pin. The other wiring task is to re-connect the snapped-off key PCBs to the others.

Note how the NeoPixel data line runs in a snake-like pattern through the grid.

Follow this wiring diagram to make the connections.

![](https://cdn-learn.adafruit.com/assets/assets/000/103/845/medium800/3d_printing_Numpad4K_fritz_01.jpg?1628965882)

![](https://cdn-learn.adafruit.com/assets/assets/000/103/909/medium800/3d_printing_nump4k-2490.jpg?1629130914)

Here the plate and keyswitches have been removed to expose the wiring more clearly.

![](https://cdn-learn.adafruit.com/assets/assets/000/103/910/medium800/3d_printing_nump4k-2491.jpg?1629130937)

Note: Sometimes the PCB traces that run between the key PCBs can become damaged when neighboring PCBs have been cut, just due to strain on the thin connection. You can repair these with a short jumper wire as shown on the third PCB on the bottom row in the following photograph.

![](https://cdn-learn.adafruit.com/assets/assets/000/103/911/medium800/3d_printing_nump4k-2492.jpg?1629130961)

## Assembly

Now that you've wired everything, you can insert all of the keyswitches, and then add the keycaps.

![3d_printing_nump4k-2434.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/912/medium640/3d_printing_nump4k-2434.jpg?1629131270)

![3d_printing_nump4k-2435.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/913/medium640/3d_printing_nump4k-2435.jpg?1629131297)

![3d_printing_nump4k-2433.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/914/medium640/3d_printing_nump4k-2433.jpg?1629131307)

![3d_printing_nump4k-2431.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/915/medium640/3d_printing_nump4k-2431.jpg?1629131319)

![](https://cdn-learn.adafruit.com/assets/assets/000/103/920/medium800/3d_printing_nump4k-2428.jpg?1629131347)

## Case Middle

Feed the Feather RP2040 through the case middle section as shown.

&nbsp;

![3d_printing_nump4k-2427.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/921/medium640/3d_printing_nump4k-2427.jpg?1629131423)

![3d_printing_nump4k-2426.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/922/medium640/3d_printing_nump4k-2426.jpg?1629131431)

![3d_printing_nump4k-2425.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/925/medium640/3d_printing_nump4k-2425.jpg?1629131506)

![3d_printing_nump4k-2424.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/926/medium640/3d_printing_nump4k-2424.jpg?1629131513)

![](https://cdn-learn.adafruit.com/assets/assets/000/103/934/medium800/3d_printing_nump4k-2422.jpg?1629131540)

## Case Top

Place the case top on top of the boards so you can sandwich everything and screw the parts together.

You can start with the three long screws.

![3d_printing_nump4k-2420.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/936/medium640/3d_printing_nump4k-2420.jpg?1629131557)

![3d_printing_nump4k-2419.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/937/medium640/3d_printing_nump4k-2419.jpg?1629131636)

![3d_printing_nump4k-2418.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/938/medium640/3d_printing_nump4k-2418.jpg?1629131644)

![3d_printing_nump4k-2415.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/939/medium640/3d_printing_nump4k-2415.jpg?1629131690)

## Feather Screws, Standoffs

Add the four shorter screws to the Feather mounting holes.

Then, thread the seven hex standoffs onto the screws.

![3d_printing_nump4k-2417.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/940/medium640/3d_printing_nump4k-2417.jpg?1629131717)

![3d_printing_nump4k-2414.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/941/medium640/3d_printing_nump4k-2414.jpg?1629131762)

![3d_printing_nump4k-2416.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/942/medium640/3d_printing_nump4k-2416.jpg?1629131810)

![3d_printing_nump4k-2413.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/943/medium640/3d_printing_nump4k-2413.jpg?1629131818)

## Case Bottom

Set the case bottom in place and then use the smallest screws to attach it to the hex standoffs from below.

You can also add rubber bumper feet as shown for a non-skid experience.

![3d_printing_nump4k-2412.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/944/medium640/3d_printing_nump4k-2412.jpg?1629131868)

![3d_printing_nump4k-2411.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/945/medium640/3d_printing_nump4k-2411.jpg?1629131881)

![3d_printing_nump4k-2410.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/946/medium640/3d_printing_nump4k-2410.jpg?1629131887)

![3d_printing_nump4k-2409.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/947/medium640/3d_printing_nump4k-2409.jpg?1629131895)

![](https://cdn-learn.adafruit.com/assets/assets/000/103/953/medium800/3d_printing_nump4k-2408.jpg?1629131984)

The Numpad 4000 is assembled and ready for coding in CircuitPython.

# Numpad 4000 Mechanical Keyswitch Data Entry Device

## Install 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_feather_rp2040/)
 **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/102/705/medium800/adafruit_products_FeatherRP_buttons_highlighted.jpg?1623167565)

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)
# Numpad 4000 Mechanical Keyswitch Data Entry Device

## Code and use the Numpad 4000

## Text Editor

Adafruit recommends using the **Mu** editor for editing your CircuitPython code. You can get more info in [this guide](https://learn.adafruit.com/welcome-to-circuitpython/installing-mu-editor).

Alternatively, you can use any text editor that saves simple text files.

## Download the Project Bundle

Your project will use a specific set of CircuitPython libraries and the&nbsp; **code.py** &nbsp;file, along with a folder full of key configuration files. To get everything you need, click on the&nbsp; **Download Project Bundle** &nbsp;link below, and uncompress the .zip file.

Drag the contents of the uncompressed bundle directory onto your Feather board's **CIRCUITPY** &nbsp;drive, replacing any existing files or directories with the same names, and adding any new ones that are necessary.

https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/Numpad_4000/code.py

## Use the Numpad 4000

Once the libraries and code are installed, the Numpad 4000 will work as a USB HID keyboard device. You can try it out right away by plugging the keyboard into your computer via a known good USB cable and then typing in some numbers and symbols.

[This guide page](https://learn.adafruit.com/adafruit-gemma-m0/circuitpython-hid-keyboard-and-mouse) has a great intro to CircuitPython HID Keyboard.

For even more details, check out the documentation at [https://circuitpython.readthedocs.io/projects/hid/en/latest/](https://circuitpython.readthedocs.io/projects/hid/en/latest/) which includes all of the keycodes and media codes you can use.

If you want to customize the keys, to send different keycodes, this dictionary contains all of the mappings:

```python
keymap = {
            (0): (0, Keycode.KEYPAD_NUMLOCK),
            (1): (0, Keycode.BACKSPACE),
            (2): (0, Keycode.FORWARD_SLASH),
            (3): (0, Keycode.KEYPAD_ASTERISK),
            (4): (0, Keycode.KEYPAD_MINUS),

            (5): (0, Keycode.PAGE_UP),
            (6): (0, Keycode.KEYPAD_SEVEN),
            (7): (0, Keycode.KEYPAD_EIGHT),
            (8): (0, Keycode.KEYPAD_NINE),

            (9): (0, Keycode.PAGE_DOWN),
            (10): (0, Keycode.KEYPAD_FOUR),
            (11): (0, Keycode.KEYPAD_FIVE),
            (12): (0, Keycode.KEYPAD_SIX),
            (13): (0, Keycode.KEYPAD_PLUS),

            (14): (1, Keycode.SHIFT),
            (15): (0, Keycode.KEYPAD_ONE),
            (16): (0, Keycode.KEYPAD_TWO),
            (17): (0, Keycode.KEYPAD_THREE),

            (18): (2, Keycode.CONTROL),
            (19): (0, Keycode.KEYPAD_ZERO),
            (20): (0, Keycode.KEYPAD_PERIOD),
            (21): (0, Keycode.KEYPAD_EQUALS)  # KEYPAD_ENTER on non-mac
}
```


## Guide Products

### 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)
### Adafruit Feather RP2040

[Adafruit Feather RP2040](https://www.adafruit.com/product/4884)
A new chip means a new Feather, and the Raspberry Pi RP2040 is no exception. When we saw this chip we thought "this chip is going to be awesome when we give it the Feather Treatment" and so we did! This Feather features the&nbsp; **RP2040** , and all niceties you know and...

In Stock
[Buy Now](https://www.adafruit.com/product/4884)
[Related Guides to the Product](https://learn.adafruit.com/products/4884/guides)
### Kailh Mechanical Key Switches - Thick Click Jade Box - 10 pack

[Kailh Mechanical Key Switches - Thick Click Jade Box - 10 pack](https://www.adafruit.com/product/5149)
For crafting your very own custom keyboard, these **&nbsp;Kailh Clicky Jade mechanical key switches** &nbsp;are deeee-luxe! With smooth actuation and Cherry MX compatibility, they're lovely when you want a **'thick' and satisfying clicky...**

In Stock
[Buy Now](https://www.adafruit.com/product/5149)
[Related Guides to the Product](https://learn.adafruit.com/products/5149/guides)
### Kailh Mechanical Key Switches - 10 packs - Cherry MX Compatible

[Kailh Mechanical Key Switches - 10 packs - Cherry MX Compatible](https://www.adafruit.com/product/4996)
For crafting your very own custom keyboard, these **&nbsp;Kailh mechanical key switches** &nbsp;are deeee-luxe!

Come&nbsp;in a pack of 10 switches, plenty to make a small keyboard, or grab a few packs to build a full keyboard.

- Use these with our&nbsp;<a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/4996)
[Related Guides to the Product](https://learn.adafruit.com/products/4996/guides)
### Black DSA Keycaps for MX Compatible Switches - 10 pack

[Black DSA Keycaps for MX Compatible Switches - 10 pack](https://www.adafruit.com/product/4997)
Dress up your mechanical keys in your favorite colors, with a wide selection of stylish DSA key caps. Here is a 10 pack of Adafruit black DSA keycaps for your next mechanical keyboard or&nbsp;[NeoKey](https://www.adafruit.com/?q=neokey&sort=BestMatch)&nbsp;project. Snap 'em...

In Stock
[Buy Now](https://www.adafruit.com/product/4997)
[Related Guides to the Product](https://learn.adafruit.com/products/4997/guides)
### Woven USB Cable with USB Type A to Right Angle USB Type C

[Woven USB Cable with USB Type A to Right Angle USB Type C](https://www.adafruit.com/product/5031)
Some days we're feeling extra fancy here at the 'fruit warehouse, and we have a big soft spot for woven fabric cables. Like, peep [this fully reversible pink/purple Blinka-inspired cable](https://www.adafruit.com/product/4111)&nbsp;or <a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/5031)
[Related Guides to the Product](https://learn.adafruit.com/products/5031/guides)
### Black Nylon Machine Screw and Stand-off Set – M2.5 Thread

[Black Nylon Machine Screw and Stand-off Set – M2.5 Thread](https://www.adafruit.com/product/3299)
Totaling 380 pieces, this **M2.5 Screw Set** &nbsp;is a must-have for your workstation.&nbsp;You'll have enough screws, nuts, and hex standoffs to fuel your maker tendencies&nbsp;for days on end! M2.5 size screws fit almost all of the Adafruit breakout/dev board mounting holes...

In Stock
[Buy Now](https://www.adafruit.com/product/3299)
[Related Guides to the Product](https://learn.adafruit.com/products/3299/guides)
### Little Rubber Bumper Feet - Pack of 4

[Little Rubber Bumper Feet - Pack of 4](https://www.adafruit.com/product/550)
Keep your electronics from going barefoot, give them little rubber feet! These small sticky bumpers are our favorite accessory for any electronic kit or device. They are sticky, but not impossible to remove. They're small enough to fit onto any board, and have just enough height to give...

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

## Related Guides

- [Introducing Adafruit Feather RP2040](https://learn.adafruit.com/adafruit-feather-rp2040-pico.md)
- [Adafruit NeoKey 5x6 Ortho Snap-Apart](https://learn.adafruit.com/adafruit-neokey-5x6-ortho-snap-apart.md)
- [Mini VOTE Keyboard](https://learn.adafruit.com/vote-keyboard.md)
- [4x12 Ortho Mechanical Keyboard](https://learn.adafruit.com/4x12-ortho-mechanical-keyboard.md)
- [HalloWing Magic 9 Ball](https://learn.adafruit.com/hallowing-magic-9-ball.md)
- [FunHouse IoT Fume Extractor and Air Quality Sensor](https://learn.adafruit.com/funhouse-fume-extractor-iot-air-quality-sensor.md)
- [QT Py Snap Fit Case](https://learn.adafruit.com/qt-py-snap-fit-case.md)
- [Feather RP2040 DVI Video Synth](https://learn.adafruit.com/feather-rp2040-dvi-video-synth.md)
- [MacroPad Summer Olympics Hotkeys](https://learn.adafruit.com/macropad-olympic-hotkeys.md)
- [CircuitPython Painter](https://learn.adafruit.com/circuitpython-painter.md)
- [Introducing Adafruit Crickit #MakeRobotFriend](https://learn.adafruit.com/adafruit-crickit-creative-robotic-interactive-construction-kit.md)
- [Wooden NeoPixel Xmas Tree](https://learn.adafruit.com/wooden-neopixel-xmas-tree.md)
- [Adafruit IO IOT Hub with the Adafruit FunHouse](https://learn.adafruit.com/adafruit-io-hub-with-the-adafruit-funhouse.md)
- [Candy Bucket GIF Player Eyes](https://learn.adafruit.com/candy-bucket-gif-eyes.md)
- [Darth Faders](https://learn.adafruit.com/darth-faders.md)
- [ESP-NOW Walkie Talkies](https://learn.adafruit.com/esp-now-walkie-talkies.md)
- [Blahaj Alarm and Lamp](https://learn.adafruit.com/blahaj-alarm.md)
