# Giant Mechanical Keyboard

## Overview

These giant-sized key switches from Kailh are massive! Many times the size of a traditional MX-style switch. Though intended as a novelty item, they’re fully functional and just begging to be put to good use. I picked up one of each type from [Novelkeys - Blue (tactile click), Red (tactile bump), and Yellow (linear)](https://novelkeys.xyz/products/the-big-switch-series).&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/050/188/medium800/projects_big_switches-850.jpg?1516090738)

So, what can you do with a three-button keyboard? A giant control-alt-delete keyboard to kill programs with authority seems the most logical application …

# What You'll Need

**Basics:**

- [Circuit Playground Express](https://www.adafruit.com/product/3333) ([or any other CircuitPython capable board](https://www.adafruit.com/category/957), I just happened to have a CPX handy)
- 3 x [Big Switch Series keyswitches](https://novelkeys.xyz/products/the-big-switch-series) (1 x red, 1 x blue, 1 x yellow)
- [USB Micro Cable](https://www.adafruit.com/product/2185)
- [Solid core hook-up wire](https://www.adafruit.com/product/1311) or [alligator clip leads](https://www.adafruit.com/product/1008)
- [Pliers](https://www.adafruit.com/product/146)

**For frame:**

- 3 x [10mm white LEDs](https://www.adafruit.com/product/846)
- 3 x 10Ω resistors
- 1 x [3/4" x 36" wooden dowel](https://www.homedepot.com/p/Waddell-8312U-3-4-in-x-3-4-in-x-36-in-Hardwood-Square-Dowel-10001817/203334084)
- Wood glue
- 4 x Small clamps or vise
- Hot glue gun & glue sticks
- Hacksaw or bandsaw to cut dowels

# Giant Mechanical Keyboard

## Build the Frame

![](https://cdn-learn.adafruit.com/assets/assets/000/050/341/medium800/projects_dowels-850.jpg?1516653175)

We'll need some sort of frame to support the switches during use. You can easily make one using square&nbsp;3/4" x 36" dowels and wood glue.

# Measure & Cut Dowels
![](https://cdn-learn.adafruit.com/assets/assets/000/050/342/medium800/projects_cutting_dowels.jpg?1516653194)

Use a hacksaw or bandsaw to cut your dowel into the following pieces:

- 2 x 240mm length
- 4 x 55.5mm length
- 4 x 40mm&nbsp;length

# Assemble
![](https://cdn-learn.adafruit.com/assets/assets/000/050/343/medium800/projects_gluing1.jpg?1516653210)

Apply wood glue to both ends of each 55.5mm piece of dowel and assemble them between the two longer 240mm pieces. Make sure to leave a 55.5m gap between each piece.

Clamp the frame together using clamps and allow the glue to cure - the glue I'm using cured within in an hour. Once the frame's glue has dried, remove the clamps and then move on to attaching the legs.

![](https://cdn-learn.adafruit.com/assets/assets/000/050/344/medium800/projects_gluing2.jpg?1516653225)

Apply glue to one end of each 30mm piece, secure them to each corner on the bottom side of the frame, clamp, and allow them to dry.

# Mount Switches
![](https://cdn-learn.adafruit.com/assets/assets/000/050/345/medium800/projects_mount_switches.jpg?1516653240)

Place each switch in one of the frame's square slots.&nbsp; I used blue as Switch 1, yellow as Switch 2, and Red as Switch 3 and wrote some code to display corresponding colors on the Circuit Playground Express.

# Giant Mechanical Keyboard

## Wiring

![](https://cdn-learn.adafruit.com/assets/assets/000/050/306/medium800/projects_big_switch-wiring_diagram-999px.jpg?1516341360)

Each switch has four leads which need to be connected - two for the switch itself and two for its LED. Reference the above diagram and the list below for what connects to where.

## Connections

- Switch 1, Pin 1&nbsp;→&nbsp;GND
- Switch 1, Pin 2 →&nbsp;A7
- LED 1, short lead&nbsp;→&nbsp;GND
- LED 1, long lead&nbsp;→&nbsp;A6
- Switch 2, Pin 1&nbsp;→&nbsp;GND
- Switch 2, Pin 2&nbsp;→&nbsp;A5
- LED 2, short lead&nbsp;→&nbsp;GND
- LED 2, long lead&nbsp;→&nbsp;A4
- Switch 3, Pin 1&nbsp;→&nbsp;GND
- Switch 3, Pin 2&nbsp;→&nbsp;A3
- LED 3, short lead&nbsp;→&nbsp;GND
- LED 3, long lead&nbsp;→&nbsp;A2

Solder the 10 ohm resistors to the long leads (as shown in the diagram).

# Solder & Mount LEDs
Bend the leads of each LED and solder and hook a piece of solid core wire to each lead. Use black wire on the shorter (negative) lead and colored wire on the longer (positive) lead. Solder the wire to each lead and use a piece of heat-shrink tubing on each one to prevent them from shorting together. The side with the resistor may need a bit bigger size heat shrink.

Insert each LED into the LED slot on its&nbsp;respective switch. Use a small amount of hot glue to secure it in place.

# Solder Switches

You can use solid core or stranded wire to make connections between the switches and the Circuit Playground.&nbsp; I used solid core to avoid having to twist and tin any wire leads.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/050/346/medium800/projects_tin_leads.jpg?1516653261)

To make soldering our wires easier, apply a small amount of solder to each of the switch leads - just be sure not to heat the lead for more than a second or two.

![](https://cdn-learn.adafruit.com/assets/assets/000/050/348/medium800/projects_connect_grounds-850.jpg?1516653294)

Strip the ends of the black LED wires and wrap them around their respective switch's silver terminal. Cut and strip the ends from two additional pieces of black wire and use them to connect each of the switch's silver terminals as seen above.

![](https://cdn-learn.adafruit.com/assets/assets/000/050/349/medium800/projects_switch_lines.jpg?1516653323)

Cut and strip the ends from another piece of longer black wire and wrap it around switch 1's silver terminal. Cut three pieces of colored wire and wrap them around each switch's copper terminal.

Once all the pieces are in place, **solder them** securely **to the terminals**.

# Solder Connections to the Circuit Playground Express
 **Mount the Circuit Playground** to the front of the frame using **velcro** or **double-sided tape**. This will keep it stable while we solder the final connections.

![](https://cdn-learn.adafruit.com/assets/assets/000/050/417/medium800/projects_CP-connections-wrapped.jpg?1516662952)

Take the black wire from switch 1's silver terminal and wrap its free end around the Circuit Playground's **GND** terminal. Connect the remaining **switch and LED wires** to the **Circuit Playground** using the **connections** list at the top of this page.

![](https://cdn-learn.adafruit.com/assets/assets/000/050/418/medium800/projects_CP-connections-soldered.jpg?1516663349)

Once you're sure all connections are correct, **solder** them to each **terminal** on the **Circuit Playground**.

# Giant Mechanical Keyboard

## Program the Circuit Playground

![](https://cdn-learn.adafruit.com/assets/assets/000/050/419/medium800/projects_finished2.jpg?1516663420)

If you haven't yet, [visit the Circuit Playground Express introduction guide to learn about the CPX](../../../../adafruit-circuit-playground-express) and [how to install CircuitPython](../../../../adafruit-circuit-playground-express/circuitpython-quickstart)

Connect the Circuit Playground to your computer, copy the below code and save it as a file named **code.py** on your Circuit Playground's root directory.

Warning: 

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

![](https://cdn-learn.adafruit.com/assets/assets/000/050/458/medium800/projects_giant-mechanical-keyboard-2keyspressed4.jpg?1516735137)

If everything worked correctly, pressing a switch should **light its LED** , change the color of the Circuit Playground's **neopixels** , and send a **keyboard command** out over USB to your computer. Additionally, pressing multiple switches simultaneously should mix each switch's color and display it on the Circuit Playground.

# Giant Mechanical Keyboard

## Use it

![](https://cdn-learn.adafruit.com/assets/assets/000/050/450/medium800/projects_giant-mechanical-keyboard-3keyspressed-closeup.jpg?1516677313)

By default, the switches will send the following keystrokes when pressed:

- Switch 1 = CONTROL
- Switch 2 = ALT
- Switch 3 = DELETE

Each switch's LED will light when pressed, its corresponding color will display on the Circuit Playground's built-in neopixel LEDs, and colors will mix when pressed simultaneously.

# Customize it

You can easily **change what keystrokes are sent** from each switch by modifying the code.&nbsp; Check out the following line from the code we uploaded in the previous step:

```auto
buttonkeys = [Keycode.CONTROL, Keycode.ALT, Keycode.DELETE]
```

Change the above **keycodes** to whatever you like by finding your preferred keycode in the [adafruit\_hid.keycode reference](https://circuitpython.readthedocs.io/projects/hid/en/latest/_modules/adafruit_hid/keycode.html).

**For example** : If you want to use the switches to open the **Force Quit Applications** window on a **Mac** (Command-Option-Escape), change the line to:

```auto
buttonkeys = [Keycode.GUI, Keycode.ALT, Keycode.ESCAPE]
```

Of course, since the switches are simple digital inputs on the Circuit Playground, you can use them as pretty much anything – **sound triggers** , **game buzzers** , **robotics controller** , etc.&nbsp;

Really - what electronics couldn't benefit from giant button input?


## Related Guides

- [Adafruit Circuit Playground Express](https://learn.adafruit.com/adafruit-circuit-playground-express.md)
- [Distance Measurement with Ultrasound](https://learn.adafruit.com/distance-measurement-ultrasound-hcsr04.md)
- [Playing Arduboy Games on Arcada](https://learn.adafruit.com/playing-arduboy-games-on-arcada.md)
- [Breakbeat Breadboard](https://learn.adafruit.com/breakbeat-breadboard.md)
- [DIY Desktop Calculator with CircuitPython ](https://learn.adafruit.com/diy-rpn-desktop-calculator-with-circuitpython.md)
- [Super Nintendo USB Controller](https://learn.adafruit.com/super-nintendo-usb-controller.md)
- [Using the Android CircuitPython Editor](https://learn.adafruit.com/using-the-android-circuitpython-editor.md)
- [Adafruit Circuit Playground TFT Gizmo](https://learn.adafruit.com/adafruit-tft-gizmo.md)
- [IoT Air Quality Sensor with Adafruit IO](https://learn.adafruit.com/diy-air-quality-monitor.md)
- [Motorized Grinch Fireplace](https://learn.adafruit.com/grinch-fireplace.md)
- [Rack and Pinion Bot](https://learn.adafruit.com/rack-and-pinion-bot.md)
- [Chauncey the Flower Care Bot with CLUE and Bonsai Buckaroo](https://learn.adafruit.com/chauncey-flower-watering-bot-clue.md)
- [Easy Sparkle Pocket T-Shirt](https://learn.adafruit.com/easy-sparkle-pocket-t-shirt.md)
- [MakeCode Course for Circuit Playground Express](https://learn.adafruit.com/makecode-circuit-playground-express-course.md)
- [Glowing Interactive Crystal Staff ](https://learn.adafruit.com/glowing-interactive-crystal-staff.md)
- [Crickit Powered Mini Chair Swing Ride!](https://learn.adafruit.com/mini-chair-swing-ride.md)
