• Models
  • Contests
  • Slicer
  • Login
  • Start Here
    thingiverse-iconprintables-iconcults3d-iconmakerworld-iconmyminifactory-icon

    3D GO

    3D ModelsContestsCollectionsSaved ModelsOn a mobile device?

3D GO

Privacy Policy
6 Key MX Keypad 3D Printer File Image 1
6 Key MX Keypad 3D Printer File Thumbnail 1

6 Key MX Keypad

Steve DeGroof avatarSteve DeGroof

January 4, 2026

printables-icon
DescriptionCommentsTags

Description

Non-printed Parts

The non-printed parts for this are:

  • an Adafruit Trinket M0 microcontroller

  • six MX key switches

The switches sit in the tray, with their leads sticking out the bottom. The microcontroller rests on 4 pegs inside the box. You'll also need some hookup wire to connect the microcontroller to the keys, and a micro USB to USB-A or USB-C cable to connect the keypad to your computer.

Printing

Everything can be printed in PLA at 0.4mm layer height. The key markings are recessed by 0.4mm, so doing a filament change at 0.6mm and 0.8mm will give the keys contrasting text.

Wiring the Switches

Make sure you fit the key switches into the tray before wiring them up.

The switches have 2 leads. Wire one lead of each of the 3 left switches together. Do the same for the right switches. These will be your 2 column wires. Connect these to pins A3 and A4 on the Trinket.

Wire the other side of the switches in side-by-side pairs. These will be your 3 row wires. Connect these to pins A0, A1 and A2 of the Trinket.

For example, I've got the left column connected to A4, the right column to A3, and the top, middle and bottom rows to A1, A2 and A0 respectively. It doesn't really matter what order you put them in, as long as the Arduino code matches the connections (lines 263, 264 of the .ino file)

Programming

The code supplied here emulates a USB keyboard and generates Alt sequences for typing special characters. NOTE: This only works for Windows machines. The key sequences for Linux, Chromebook and Mac machines are completely different. 

Also, the Alt sequences tend to work only if numlock is on. I've updated the code to toggle numlock if the bottom 2 keys are pressed at the same time. This can come in handy if you're hooked up to a laptop that doesn't have a numlock key.

Lines 42-211 define the Alt sequence for each possible key. When a key is pressed, the microcontroller sends out an Alt key down, followed by 3 or 4 keystrokes on the numpad, followed by an Alt key up.

Line 36 defines which of the alt sequences to use for each key (left to right, top to bottom).

The Arduino IDE should handle the code with too much trouble. You'll probably need to have it download a bunch of libraries and board profiles, though.

With a few changes to the Arduino code, it can be repurposed to work with non-Windows machines, or for use as a macro pad. 

Assembly

There are no fasteners involved. Everything is friction-fit.

Fit the keycaps onto the key switches before fitting the tray into the box.

Once the keys and Trinket are wired up, push them into the the box, with the Trinket sitting on the 4 pegs. It's a bit fiddly to get the Trinket in place, especially once it's wired up. Place the tray containing the keys on the rim around the inside of the box.

Usage

It should just work. After it's been programmed, the keypad should be usable by any Windows PC.

There's a bunch of extra code in the .ino file to allow for reprogramming the keys on the fly, but it's probably not worth messing with.

License:

Creative Commons — Attribution

Related Models

bakercube preview image

bakercube

iomaa profile image

iomaa

44,463

Book Page Holder V3 preview image

Book Page Holder V3

fifindr profile image

fifindr

3,558

Mini Whistle preview image

Mini Whistle

fifindr profile image

fifindr

3,566

Bottle Opener and Cap GUN! preview image

Bottle Opener and Cap GUN!

3Deddy profile image

3Deddy

44,034

Funnel Tray preview image

Funnel Tray

fifindr profile image

fifindr

3,562

Customizable Spotify Keychain / Tag preview image

Customizable Spotify Keychain / Tag

ewt profile image

ewt

3,088

Mini Tape Gun - Tape Dispenser preview image

Mini Tape Gun - Tape Dispenser

brycelowe profile image

brycelowe

23,765

Drill Paint Mixer preview image

Drill Paint Mixer

fifindr profile image

fifindr

2,511