# Lemon Mechanical Keypad

## Overview

https://youtu.be/it3GjExxi4M

![](https://cdn-learn.adafruit.com/assets/assets/000/101/831/medium800/3d_printing_hero-lemon-lime-plant.jpg?1619447392)

## DIY USB-HID With a Twist of Lime

Make a custom USB-HID keypad in the shape of a citrus fruit. This keypad features six mechanical switches for controlling media players like Spotify, iTunes, YouTube, etc. Powered by the Adafruit QT Py RP2040 and CircuitPython.

Inside the case is a NeoPixel Jewel that slowly fades in and out making the keypad illuminate. The QT Py and NeoPixel are housed in a 3D printed case with parts that snap fit together.&nbsp;&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/101/823/medium800/3d_printing_hero-lime-open.jpg?1619439331)

## Lemon, Lime and Fruits

The case and key caps can be 3D printed in different colors. Choose a color scheme that best matches your preferred flavor of fruit. Could it be an orange, a lemon, a lime or maybe a watermelon? You decide!

![3d_printing_hero-topochico.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/824/medium640/3d_printing_hero-topochico.jpg?1619439520)

## Kailh Mechanical Key Switches

Click, click, click... Mechanical key switches offer a tactile feeling and there's a few varieties of switch type. Choose the type that best suits your preference.

![projects_hero-kailh-switches.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/842/medium640/projects_hero-kailh-switches.jpg?1619459850)

## Custom Keys

One of the goals of this project was to create a unique layout for a keypad. Originally conceived as a circular keypad, the enclosure evidently turned into a fruit inspired shape. As a result, the key caps are cute little triangular pieces.

![projects_hero-lemon-lime-keys.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/843/medium640/projects_hero-lemon-lime-keys.jpg?1619459951)

![](https://cdn-learn.adafruit.com/assets/assets/000/101/844/medium800/projects_hero-lime-kailh-reds.jpg?1619460418)

## Prerequisite Guides

Take a moment to walk through the following guides:

- [Adafruit QT Py RP2040](https://learn.adafruit.com/adafruit-qt-py-2040)
- [CircuitPython LED Animations](https://learn.adafruit.com/circuitpython-led-animations)
- [NeoPixel Uber Guide](https://learn.adafruit.com/adafruit-neopixel-uberguide)
- [CircuitPython HID Keyboard and Mouse](https://learn.adafruit.com/circuitpython-essentials/circuitpython-hid-keyboard-and-mouse)

## Parts
List of parts required for this build:

- [Adafruit QT Py RP2040](https://www.adafruit.com/product/4900)
- [Kailh Mechanical Switches](https://www.adafruit.com/product/4955)
- [NeoPixel Jewel](https://www.adafruit.com/product/2226)

![3d_printing_parts-cropped.jpg](https://cdn-learn.adafruit.com/assets/assets/000/101/747/medium640/3d_printing_parts-cropped.jpg?1619102729)

### Adafruit QT Py RP2040

[Adafruit QT Py RP2040](https://www.adafruit.com/product/4900)
What a cutie pie! Or is it... a QT Py?&nbsp;This diminutive dev board comes with one of our new favorite chip, the RP2040. It's been made famous in the new [Raspberry Pi Pico](https://www.adafruit.com/pico) _and_ our [Feather...](http://www.adafruit.com/product/4884)

In Stock
[Buy Now](https://www.adafruit.com/product/4900)
[Related Guides to the Product](https://learn.adafruit.com/products/4900/guides)
![Video of hand holding a QT Py PCB in their hand. An LED glows rainbow colors.](https://cdn-shop.adafruit.com/product-videos/640x480/4900-06.jpg)

### NeoPixel Jewel - 7 x 5050 RGB LED with Integrated Drivers

[NeoPixel Jewel - 7 x 5050 RGB LED with Integrated Drivers](https://www.adafruit.com/product/2226)
Be the belle of the ball with the NeoPixel Jewel! &nbsp;We fit seven of our tiny&nbsp;5050 (5mm x 5mm) smart RGB LEDs onto a beautiful, round&nbsp;PCB with mounting holes and a chainable design to create what we think is our most elegant (and evening-wear appropriate) NeoPixel board...

Out of Stock
[Buy Now](https://www.adafruit.com/product/2226)
[Related Guides to the Product](https://learn.adafruit.com/products/2226/guides)
![NeoPixel Jewel - 7 x 5050 RGB LED wired to Trinket, lit up rainbow](https://cdn-shop.adafruit.com/640x480/2226-01.jpg)

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

### Silicone Cover Stranded-Core Wire - 50ft 30AWG Black

[Silicone Cover Stranded-Core Wire - 50ft 30AWG Black](https://www.adafruit.com/product/3164)
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...

In Stock
[Buy Now](https://www.adafruit.com/product/3164)
[Related Guides to the Product](https://learn.adafruit.com/products/3164/guides)
![A spool of black AWG wire.](https://cdn-shop.adafruit.com/640x480/3164-01.jpg)

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

### Part: Heat Shrink
quantity: 1
Pre-Cut Multi-Colored Heat Shrink Pack Kit 
[Heat Shrink](https://www.adafruit.com/product/4559)

### Part: Solder Wire
quantity: 1
60/40 Rosin Core - 0.5mm/0.02" diameter - 50 grams
[Solder Wire](https://www.adafruit.com/product/1886)

### Part: Adjustable 60W Pen-Style Soldering Iron
quantity: 1
120VAC USA Plug - BEST 102C
[Adjustable 60W Pen-Style Soldering Iron](https://www.adafruit.com/product/3685)

### Part: Helping Third Hand
quantity: 1
Magnifier W/Magnifying Glass Tool - MZ101
[Helping Third Hand](https://www.adafruit.com/product/291)

![](https://cdn-learn.adafruit.com/assets/assets/000/101/845/medium800/projects_hero-lemon-kailh-whites.jpg?1619460438)

![](https://cdn-learn.adafruit.com/assets/assets/000/101/830/medium800/3d_printing_hero-lemon-usb.jpg?1619440501)

- [Next Page](https://learn.adafruit.com/qtpy-lemon-mechanical-keypad-macropad/circuit-diagram.md)

## Featured Products

### Adafruit QT Py RP2040

[Adafruit QT Py RP2040](https://www.adafruit.com/product/4900)
What a cutie pie! Or is it... a QT Py?&nbsp;This diminutive dev board comes with one of our new favorite chip, the RP2040. It's been made famous in the new [Raspberry Pi Pico](https://www.adafruit.com/pico) _and_ our [Feather...](http://www.adafruit.com/product/4884)

In Stock
[Buy Now](https://www.adafruit.com/product/4900)
[Related Guides to the Product](https://learn.adafruit.com/products/4900/guides)
### NeoPixel Jewel - 7 x 5050 RGB LED with Integrated Drivers

[NeoPixel Jewel - 7 x 5050 RGB LED with Integrated Drivers](https://www.adafruit.com/product/2226)
Be the belle of the ball with the NeoPixel Jewel! &nbsp;We fit seven of our tiny&nbsp;5050 (5mm x 5mm) smart RGB LEDs onto a beautiful, round&nbsp;PCB with mounting holes and a chainable design to create what we think is our most elegant (and evening-wear appropriate) NeoPixel board...

Out of Stock
[Buy Now](https://www.adafruit.com/product/2226)
[Related Guides to the Product](https://learn.adafruit.com/products/2226/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)
### Silicone Cover Stranded-Core Wire - 50ft 30AWG Black

[Silicone Cover Stranded-Core Wire - 50ft 30AWG Black](https://www.adafruit.com/product/3164)
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...

In Stock
[Buy Now](https://www.adafruit.com/product/3164)
[Related Guides to the Product](https://learn.adafruit.com/products/3164/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...

Out of 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)
### Pre-Cut Multi-Colored Heat Shrink Pack Kit - 280 pcs

[Pre-Cut Multi-Colored Heat Shrink Pack Kit - 280 pcs](https://www.adafruit.com/product/4559)
Heat shrink is the duct tape of electronics which we guess makes this heat shrink the colorful and exciting duct tape they sell&nbsp;at craft stores. &nbsp;This pack contains heat shrink tubes&nbsp;in five different colors - red, blue, aqua, yellow, and the classic Adafruit black.

Each...

In Stock
[Buy Now](https://www.adafruit.com/product/4559)
[Related Guides to the Product](https://learn.adafruit.com/products/4559/guides)
### Solder Wire - 60/40 Rosin Core - 0.5mm/0.02" diameter - 50 grams

[Solder Wire - 60/40 Rosin Core - 0.5mm/0.02" diameter - 50 grams](https://www.adafruit.com/product/1886)
If you want to make a kit you'll need some solder. This 0.1 lb (about 50 grams) spool is a good amount, not too much (like 1 lb spools) and not too little (like those little 'pocket clip' vials).  
  
This spool of solder contains approximately 0.6mm / .02" diameter in...

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

## Related Guides

- [Adafruit QT Py RP2040](https://learn.adafruit.com/adafruit-qt-py-2040.md)
- [Wireless NeoPixel Controller](https://learn.adafruit.com/neotrellis-neopixel-controller.md)
- [Programmable Wireless BLE Gesture Mouse](https://learn.adafruit.com/ble-wireless-gesture-mouse.md)
- [Knobby Sequencer](https://learn.adafruit.com/knobby-sequencer.md)
- [PyPortal Wall Mount](https://learn.adafruit.com/pyportal-wall-mount.md)
- [Three Button Foot Switch](https://learn.adafruit.com/three-button-foot-switch.md)
- [LED Neon Signs with NeoPixels](https://learn.adafruit.com/led-neon-signs-with-neopixels.md)
- [Wireless ESP32-S2 Touch Screen Controller for Pure Data](https://learn.adafruit.com/wireless-esp32-s2-controller-for-pure-data.md)
- [Stepper Motor Turntable](https://learn.adafruit.com/stepper-motor-turntable.md)
- [An Introduction to RP2040 PIO with CircuitPython](https://learn.adafruit.com/intro-to-rp2040-pio-with-circuitpython.md)
- [Computer Space Mini Arcade](https://learn.adafruit.com/computer-space-mini-arcade.md)
- [MIDI for Makers](https://learn.adafruit.com/midi-for-makers.md)
- [Adafruit Swirly Aluminum Mounting Grid for 0.1" Spaced PCBs](https://learn.adafruit.com/swirly-grid.md)
- [NeoPixel Bike Light](https://learn.adafruit.com/neopixel-headlight.md)
- [LED Emerald with Circuit Playground Bluefruit](https://learn.adafruit.com/led-emerald-with-circuit-playground.md)
- [Making Adabot: Part 1](https://learn.adafruit.com/making-adabot-part-1.md)
