# NeoKey Emoji Keyboard

## Overview

https://youtu.be/Kwq44XXJYVk

https://www.youtube.com/watch?v=jMcmw9xBf_Y

Emojis are super fun to use, but can be annoying to type when you're not on your phone. This guide will show you how to create a macro keyboard to send your favorite emojis with the press of a satisfying mechanical keyboard switch.

The code is written in CircuitPython. This makes it possible to edit your code on the go and customize your emoji choices depending on your mood.

![circuitpython_hero-code.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/620/medium640/circuitpython_hero-code.jpg?1627323527)

The keyboard uses a 1x4 NeoKey STEMMA board. This connects to a QT Py RP2040 via I2C with a STEMMA cable, which means no soldering required!

![circuitpython_hero-case-open.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/617/medium640/circuitpython_hero-case-open.jpg?1627322740)

![](https://cdn-learn.adafruit.com/assets/assets/000/103/616/medium800/circuitpython_hero-emojis-keypad-2.jpg?1627321916)

## Parts
Parts list for building this project.

- [Adafruit QT Py RP2040](https://www.adafruit.com/product/4900)
- [NeoKey 1x4 QT I2C](https://www.adafruit.com/product/4980)
- [4x Kailh Switches](https://www.adafruit.com/product/4996)
- [4x Keycaps](https://www.adafruit.com/product/5097)
- [Stemma QT Cable - 50mm&nbsp;](https://www.adafruit.com/product/4399)
- [USB-C Cable](https://www.adafruit.com/product/5153)
- [M2.5 Hardware Kit](https://www.adafruit.com/product/3299)

![circuitpython_parts.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/589/medium640/circuitpython_parts.jpg?1627311967)

### NeoKey 1x4 QT I2C - Four Mechanical Key Switches with NeoPixels

[NeoKey 1x4 QT I2C - Four Mechanical Key Switches with NeoPixels](https://www.adafruit.com/product/4980)
The only thing better than a nice mechanical key is, perhaps, FOUR mechanical keys&nbsp;that also can glow any color of the rainbow - and that's what the&nbsp; **Adafruit NeoKey 1x4 QT I2C Breakout** &nbsp;will let you do! This longgg 3" x 0.8" PCB fits...

In Stock
[Buy Now](https://www.adafruit.com/product/4980)
[Related Guides to the Product](https://learn.adafruit.com/products/4980/guides)
![Top view video of a fully assembled NeoKey 1x4 QT I2C with switches and smoke gray keycaps powered by a QT Py on a breadboard. A hand reaches down to press the keys, which emit rainbow colors. ](https://cdn-shop.adafruit.com/product-videos/640x480/4980-05.jpg)

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

### STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long

[STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long](https://www.adafruit.com/product/4399)
This 4-wire cable is&nbsp;50mm / 1.9" long and fitted with JST SH female 4-pin connectors on both ends. Compared with the chunkier JST PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert and remove.

<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/4399)
[Related Guides to the Product](https://learn.adafruit.com/products/4399/guides)
![Angled of of JST SH 4-Pin Cable.](https://cdn-shop.adafruit.com/640x480/4399-00.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)

### DSA Keycaps for MX Compatible Switches in Various Colors

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

Out of Stock
[Buy Now](https://www.adafruit.com/product/5097)
[Related Guides to the Product](https://learn.adafruit.com/products/5097/guides)
![Array of many different colored keycaps](https://cdn-shop.adafruit.com/640x480/5097-03.jpg)

### Relegendable Plastic Keycaps for MX Compatible Switches 10 pack

[Relegendable Plastic Keycaps for MX Compatible Switches 10 pack](https://www.adafruit.com/product/5039)
Get ready&nbsp;to customize your keeb with a 10&nbsp;pack of two-part plastic keycaps for your next mechanical keyboard or&nbsp;[NeoKey](https://www.adafruit.com/?q=neokey&sort=BestMatch)&nbsp;project.

Each keycap comes with a off-white base and a clear cover piece. You...

In Stock
[Buy Now](https://www.adafruit.com/product/5039)
[Related Guides to the Product](https://learn.adafruit.com/products/5039/guides)
![Angled shot of ten white plastic keycaps.](https://cdn-shop.adafruit.com/640x480/5039-08.jpg)

### Pink and Purple Woven USB A to USB C Cable - 1 meter long

[Pink and Purple Woven USB A to USB C Cable - 1 meter long](https://www.adafruit.com/product/5153)
This cable is not only super-fashionable, with a woven pink and purple Blinka-like pattern, it's also made for USB C for our modernized breakout boards, Feathers, and more.&nbsp;&nbsp;[If you want something just like it but for Micro B, we...](https://www.adafruit.com/product/4111)

Out of Stock
[Buy Now](https://www.adafruit.com/product/5153)
[Related Guides to the Product](https://learn.adafruit.com/products/5153/guides)
![Angled shot of coiled pink and purple USB cable with USB A and USB C connectors.](https://cdn-shop.adafruit.com/640x480/5153-02.jpg)

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

![](https://cdn-learn.adafruit.com/assets/assets/000/103/618/medium800/circuitpython_hero-laptop-palm.jpg?1627322817)

# NeoKey Emoji 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_qtpy_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/101/680/medium800/adafruit_products_QTRP_buttons.jpg?1618956837)

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)
# NeoKey Emoji Keyboard

## Coding the NeoKey Emoji Keyboard

![](https://cdn-learn.adafruit.com/assets/assets/000/103/614/medium800/circuitpython_laptop-code.jpg?1627321548)

Once you've finished setting up your QT Py RP2040 with CircuitPython, you can access the code and necessary libraries by downloading the Project Bundle.

To do this, click on the **&nbsp;Download Project Bundle** &nbsp;button in the window below for either macOS or Windows. It will download as a zipped folder.

### macOS Version
https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/NeoKey_Emoji_Keyboard/macOS_code/code.py

### Windows Version
https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/NeoKey_Emoji_Keyboard/windows_code/code.py

## Upload the Code and Libraries to the QT Py RP2040
After downloading the Project Bundle, plug your QT Py RP2040 into the computer USB port. You should see a new flash drive appear in the computer's File Explorer or Finder (depending on your operating system) called&nbsp; **CIRCUITPY**. Unzip the folder and copy the following items to the QT Py RP2040's&nbsp; **CIRCUITPY** &nbsp;drive.&nbsp;

- **lib** &nbsp;folder
- **code.py**

There are two versions of the emoji code: one for macOS and one for Windows. Both versions are embedded above. Choose the version for your operating system and download the Project Bundle.&nbsp;

Your QT Py RP2040&nbsp; **CIRCUITPY** &nbsp;drive should look like this after copying the&nbsp; **lib** folder and renaming the&nbsp; **code.py** &nbsp;file.

![](https://cdn-learn.adafruit.com/assets/assets/000/103/611/medium800/circuitpython_circuitpy-bigsur.jpg?1627319996)

# NeoKey Emoji Keyboard

## CircuitPython Code Walkthrough

## Import the Libraries
First, the libraries are imported.

```python
import time
import board
import busio
from adafruit_neokey.neokey1x4 import NeoKey1x4
import usb_hid
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keycode import Keycode
```

## Setup the Objects
Objects are setup for I2C, the NeoKey 1x4 and USB HID so that the QT Py RP2040 can be used as an HID keyboard over USB.

Since you're using the NeoKey with a STEMMA QT cable, the QT Py RP2040's `board.SCL1` and `board.SDA1` pins are used for I2C.

```python
# use STEMMA I2C bus on RP2040 QT Py
i2c_bus = busio.I2C(board.SCL1, board.SDA1)

# Create a NeoKey object
neokey = NeoKey1x4(i2c_bus, addr=0x30)

#  create a keyboard object
keyboard = Keyboard(usb_hid.devices)
```

## Check the Version of the Code
A quick debugging message prints to the REPL that denotes whether you are using the version of the code for macOS or Windows. This will let you know that you've loaded up the correct version of the code for your chosen operating system.

```python
#  for Windows
print("NeoKey Emoji keyboard - Windows")

#  for macOS
print("NeoKey Emoji keyboard - macOS")
```

## Debouncing States
For debouncing, each of the four switches on the NeoKey have a state that will be tracked in the loop.

```python
#  states for key presses
key_0_state = False
key_1_state = False
key_2_state = False
key_3_state = False
```

## Emoji Arrays
The last portion of the code before the loop are the emoji arrays. The way that the emojis are being sent is by searching for them by name in your operating system's default emoji menu.&nbsp;

Each array has a sequence of keycodes that searches for the name of the emoji, selects the emoji and then exits the emoji menu. These arrays are iterated through in the loop so that each keycode is sent one at a time.

The reason that there are different versions of the code for macOS and Windows since both operating systems have different ways to navigate the emoji menu.

```python
#  Windows emoji arrays

#  update these arrays to customize your emojis
#  cat face emoji
emoji_0 = [Keycode.C, Keycode.A, Keycode.T, Keycode.SPACE, Keycode.F, Keycode.ENTER, Keycode.ESCAPE]
#  lightning bolt emoji
emoji_1 = [Keycode.V, Keycode.O, Keycode.L, Keycode.T, Keycode.ENTER, Keycode.ESCAPE]
#  control panel emoji
emoji_2 = [Keycode.K, Keycode.N, Keycode.O, Keycode.ENTER, Keycode.ESCAPE]
#  guitar emoji
emoji_3 = [Keycode.G, Keycode.U, Keycode.I, Keycode.T, Keycode.ENTER, Keycode.ESCAPE]
```

```auto
#  macOS emoji arrays

#  update these arrays to customize your emojis
#  cat face emoji
emoji_0 = [Keycode.C, Keycode.A, Keycode.T, Keycode.DOWN_ARROW, Keycode.ENTER]
#  lightning bolt emoji
emoji_1 = [Keycode.V, Keycode.O, Keycode.L, Keycode.T, Keycode.DOWN_ARROW, Keycode.ENTER]
#  control panel emoji
emoji_2 = [Keycode.C, Keycode.O, Keycode.N, Keycode.T, Keycode.R, Keycode.O,
           Keycode.DOWN_ARROW, Keycode.ENTER]
#  guitar emoji
emoji_3 = [Keycode.G, Keycode.U, Keycode.I, Keycode.T, Keycode.DOWN_ARROW, Keycode.ENTER]
```

## Customize Your Emojis
If you wanted to change the emojis, you would need to open your operating system's emoji menu, find the official name of your desired emoji and update an emoji array with the needed keycodes.

Most emojis can be brought up by entering a portion of its name, which can help you to keep the length of your arrays fairly short.

## The Loop
### Switch Debouncing and Turning Off NeoPixels
The loop begins with debouncing for the four `neokey` inputs. Additionally, logic is setup so that when a `neokey` is released, its corresponding NeoPixel is turned off.

```auto
#  switch debouncing
    #  also turns off NeoPixel on release
    if not neokey[0] and key_0_state:
        key_0_state = False
        neokey.pixels[0] = 0x0
    if not neokey[1] and key_1_state:
        key_1_state = False
        neokey.pixels[1] = 0x0
    if not neokey[2] and key_2_state:
        key_2_state = False
        neokey.pixels[2] = 0x0
    if not neokey[3] and key_3_state:
        key_3_state = False
        neokey.pixels[3] = 0x0
```

### Open the Emoji Menu
The rest of the loop contains `if` statements for each `neokey`. If a `neokey` is pressed, then its corresponding NeoPixel is turned on with its assigned color.&nbsp; Then, depending on your operating system, the keyboard macro to open the emoji menu is opened.&nbsp;

For Windows, this key sequence is Windows Key + Period and for macOS, it is Control + Command + Space.

A longer than normal pause is required after sending the macro to open the menu. This differs between operating systems, with Windows requiring almost a full second to fully open.

```python
#  Windows version of the code

#  if 1st neokey is pressed...
    if neokey[0] and not key_0_state:
        print("Button A")
        #  turn on NeoPixel
        neokey.pixels[0] = 0xFF0000
        #  open windows emoji menu
        keyboard.send(Keycode.WINDOWS, Keycode.PERIOD)
        #  delay for opening menu
        time.sleep(0.75)
```

```python
#  macOS version of the code

    #  if 1st neokey is pressed...
    if neokey[0] and not key_0_state:
        print("Button A")
        #  turn on NeoPixel
        neokey.pixels[0] = 0xFF0000
        #  open macOS emoji menu
        keyboard.send(Keycode.CONTROL, Keycode.COMMAND, Keycode.SPACE)
        #  delay for opening menu
        time.sleep(.2)
```

### Send the Emoji
After this, a `for` statement is setup to iterate through the corresponding emoji array. `keyboard.send()` is used to send each individual keycode in the emoji array with a slight delay between each message.

`keyboard.send()` has the benefit of both pressing and releasing the keycode compared to `keyboard.press()` and `keyboard.release()`.

Finally, the state of the `neokey` is updated for debouncing.

```python
#  send key presses for emoji_0
        for i in emoji_0:
            keyboard.send(i)
            time.sleep(0.05)
        #  update key state
        key_0_state = True
```

# NeoKey Emoji Keyboard

## 3D Printing

## CAD Parts List

STL files for 3D printing are oriented to print "as-is" on FDM style machines. Parts are designed to 3D print without any support material. Original design source may be downloaded using the links below:

- top-cover.stl
- bottom-cover.stl
- frame.stl

![circuitpython_3d-parts.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/623/medium640/circuitpython_3d-parts.jpg?1627324172)

[Fusion 360 Share Link](https://a360.co/3eZ5hFo)
[Download Fusion Archive](https://cdn-learn.adafruit.com/assets/assets/000/103/626/original/Emjoi_1x4_Keypad_v13.f3z.zip?1627326643)
[Download STLs.zip](https://cdn-learn.adafruit.com/assets/assets/000/103/624/original/STLs.zip?1627324256)
[Download STEP file](https://cdn-learn.adafruit.com/assets/assets/000/103/625/original/Emjoi_1x4_Keypad_v14.step.zip?1627324575)
## Slicing Parts

No supports are required. Slice with setting for PLA material.&nbsp;

Minimum bed volume: 130mm x 130mm

The parts were sliced using CURA using the slice settings below.

- PLA filament 220c extruder
- 0.2 layer height
- 10% gyroid infill
- 60mm/s print speed
- 60c heated bed

![circuitpython_cura-slider.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/621/medium640/circuitpython_cura-slider.jpg?1627323800)

## CAD Assembly

The 1x4 NeoKey PCB is secured to standoffs with M2.5 screws. The standoffs are secured to the bottom cover with additional M2.5 screws. The QT Py RP2040 snap fits into the built-in holder on the bottom cover. The frame snap fits over the bottom cover. The top cover snap fits over the frame. Keyswitches are fitted over the holes on the top cover and snap fit into the sockets on the 1x4 NeoKey PCB.

![circuitpython_cad-explode.gif](https://cdn-learn.adafruit.com/assets/assets/000/103/655/medium640thumb/circuitpython_cad-explode.jpg?1627409153)

## Design Source Files

The project assembly was designed in Fusion 360. This can be downloaded in different formats like STEP, STL and more. Electronic components like Adafruit's board, displays, connectors and more can be downloaded from the&nbsp;[Adafruit CAD parts GitHub Repo](https://github.com/adafruit/Adafruit_CAD_Parts).

![circuitpython_4980_NeoKey_1x4_QT.gif](https://cdn-learn.adafruit.com/assets/assets/000/103/622/medium640thumb/circuitpython_4980_NeoKey_1x4_QT.jpg?1627323995)

# NeoKey Emoji Keyboard

## Assembly

## Hardware Screws

Use the following hardware for securing the NeoKey 1x4 PCB to the bottom cover.

- 8x M2.5 screws - 4mm long
- 4x M2.5 FF standoffs – 6mm long

![circuitpython_bottom-cover-hardware.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/592/medium640/circuitpython_bottom-cover-hardware.jpg?1627312377)

## Install Hardware

Start by inserting an M2.5 x 4mm screw through the top side of the PCB. Fasten an M2.5 x 6mm standoff to the thread of the screw on the bottom of the PCB.

Repeat process for the remaining mounting holes. Double check the standoffs are installed on the top side of the PCB.

![circuitpython_neokey-hardware-install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/593/medium640/circuitpython_neokey-hardware-install.jpg?1627312607)

![circuitpython_neokey-hardware-installed.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/594/medium640/circuitpython_neokey-hardware-installed.jpg?1627312709)

## Screws for PCB

Use the remaining M2.5 screws to secure the 1x4 NeoKey to the bottom cover. Place the 1x4 NeoKey over the bottom cover and line up the mounting holes.

The orientation of the 1x4 NeoKey and bottom cover doesn't matter but you should take note. You'll need to ensure the key switches are oriented correctly before installing.

![circuitpython_bottom-cover-screws.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/596/medium640/circuitpython_bottom-cover-screws.jpg?1627316989)

![circuitpython_bottom-cover-installing.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/598/medium640/circuitpython_bottom-cover-installing.jpg?1627316164)

## Secure NeoKey

While holding the 1x4 NeoKey in place, insert and fasten an M2.5 x 4mm screw through the mounting holes on the bottom cover.

Repeat process for the remaining mounting holes. Ensure the screws are secure but not over tightened.

![circuitpython_bottom-cover-secure-pcb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/595/medium640/circuitpython_bottom-cover-secure-pcb.jpg?1627316038)

![circuitpython_bottom-cover-secured.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/599/medium640/circuitpython_bottom-cover-secured.jpg?1627317166)

## Connect QTPY RP2040

Get the STEMMA QT cable and QT Py RP2040 ready to install.

Connect the STEMMA QT cable from the right side of the 1x4 NeoKey.

Connect the STEMMA QT cable to the port on the back of the QT Py RP2040.

![circuitpython_qtpy-cable-preinstall.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/600/medium640/circuitpython_qtpy-cable-preinstall.jpg?1627316231)

![circuitpython_qtpy-neokey-connect.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/603/medium640/circuitpython_qtpy-neokey-connect.jpg?1627316508)

## Install QT Py RP 2040

The QT Py RP2040 is snap fitted into the built-in holder on the bottom cover.&nbsp;

Place the QT Py RP2040 into the built-in holder with the USB-C port facing the correct side.

![circuitpython_qtpy-bottom-installed.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/604/medium640/circuitpython_qtpy-bottom-installed.jpg?1627316991)

## Install Frame

The frame snap fits over the bottom cover. The nubs lock onto the edges of the bottom cover.

Orient the frame with the cutout line up with the USB-C port on the QT Py RP2040.

The opening should be facing above the QT Py with the bridge going across the bottom of the PCB.

![circuitpython_frame-installed.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/605/medium640/circuitpython_frame-installed.jpg?1627317280)

## Install Top Cover

The top cover is snap fitted over the frame. The edges lock onto the nubs on the frame.

Orient the top cover so the key holes are lined up with key sockets on the 1x4 NeoKey.

Firmly press the top cover onto the frame to snap fit closed.

&nbsp;

![circuitpython_topcover-installed.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/606/medium640/circuitpython_topcover-installed.jpg?1627317377)

## Install Switches

The 4x Kailh switches (or Cherry MX compatibles) must be lined correctly in order to properly fit onto the 1x4 NeoKey.

Use the slots for the LED on the keys as an indicator for correctly orienting the keys. The slot should be facing the reverse mounted NeoPixel.

Snap fit the switches into the key holes on the top cover with the switches oriented correctly.

![circuitpython_keys-installing.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/607/medium640/circuitpython_keys-installing.jpg?1627317395)

![circuitpython_keys-installed.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/610/medium640/circuitpython_keys-installed.jpg?1627317871)

## Install Keycaps

Install your preferred keycaps by press fitting them onto the stem of the key switches. Firmly press the keycaps down to fully seat them.

![circuitpython_keycaps-preinstall.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/608/medium640/circuitpython_keycaps-preinstall.jpg?1627316831)

![circuitpython_keycaps-installed.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/609/medium640/circuitpython_keycaps-installed.jpg?1627317675)

## USB Connect

Use the cutout on the side of the case to connect a USB-C type cable.

![](https://cdn-learn.adafruit.com/assets/assets/000/103/619/medium800/circuitpython_hero-case-upright.jpg?1627322855)

# NeoKey Emoji Keyboard

## Usage

![](https://cdn-learn.adafruit.com/assets/assets/000/103/628/medium800/circuitpython_keycodes-emojis.jpg?1627333799)

# macOS Big Sur
In order for the emoji's to work properly on mac OS Big Sur, the window will need to be changed to a popup.

By default, emoji's are accessible in the **Character Viewer**. Use the **Control + Command + Spacebar** shortcut to open the Character View.

Click on the menu icon on the far right (next to the search box) to change the window to a popup.

## macOS BigSur Keyboard Setting

By default, macOS BigSur uses the Globe key to open the emoji window. This will need to be changed in the Settings \> Keyboard preferences. Under the "Press :globe\_with\_meridians: to" dropdown menu, click and select "Start Dictation (Press Twice)". This option will enable the emoji window to open with Control + Command + Spacebar." add this image to it.

![circuitpython_bigsur-keyboard-setting.jpg](https://cdn-learn.adafruit.com/assets/assets/000/103/636/medium640/circuitpython_bigsur-keyboard-setting.jpg?1627391480)

## Download PDF Template – Emoji Sheet for Keycaps
[keycaps_emojis.pdf](https://cdn-learn.adafruit.com/assets/assets/000/103/992/original/keycaps_emojis.pdf?1629297128)

## Featured Products

### NeoKey 1x4 QT I2C - Four Mechanical Key Switches with NeoPixels

[NeoKey 1x4 QT I2C - Four Mechanical Key Switches with NeoPixels](https://www.adafruit.com/product/4980)
The only thing better than a nice mechanical key is, perhaps, FOUR mechanical keys&nbsp;that also can glow any color of the rainbow - and that's what the&nbsp; **Adafruit NeoKey 1x4 QT I2C Breakout** &nbsp;will let you do! This longgg 3" x 0.8" PCB fits...

In Stock
[Buy Now](https://www.adafruit.com/product/4980)
[Related Guides to the Product](https://learn.adafruit.com/products/4980/guides)
### 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)
### 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)
### DSA Keycaps for MX Compatible Switches in Various Colors

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

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

[Relegendable Plastic Keycaps for MX Compatible Switches 10 pack](https://www.adafruit.com/product/5039)
Get ready&nbsp;to customize your keeb with a 10&nbsp;pack of two-part plastic keycaps for your next mechanical keyboard or&nbsp;[NeoKey](https://www.adafruit.com/?q=neokey&sort=BestMatch)&nbsp;project.

Each keycap comes with a off-white base and a clear cover piece. You...

In Stock
[Buy Now](https://www.adafruit.com/product/5039)
[Related Guides to the Product](https://learn.adafruit.com/products/5039/guides)
### STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long

[STEMMA QT / Qwiic JST SH 4-Pin Cable - 50mm Long](https://www.adafruit.com/product/4399)
This 4-wire cable is&nbsp;50mm / 1.9" long and fitted with JST SH female 4-pin connectors on both ends. Compared with the chunkier JST PH these are 1mm pitch instead of 2mm, but still have a nice latching feel, while being easy to insert and remove.

<a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/4399)
[Related Guides to the Product](https://learn.adafruit.com/products/4399/guides)
### Pink and Purple Woven USB A to USB C Cable - 1 meter long

[Pink and Purple Woven USB A to USB C Cable - 1 meter long](https://www.adafruit.com/product/5153)
This cable is not only super-fashionable, with a woven pink and purple Blinka-like pattern, it's also made for USB C for our modernized breakout boards, Feathers, and more.&nbsp;&nbsp;[If you want something just like it but for Micro B, we...](https://www.adafruit.com/product/4111)

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

## Related Guides

- [Adafruit QT Py RP2040](https://learn.adafruit.com/adafruit-qt-py-2040.md)
- [Adafruit NeoKey 1x4 QT I2C Breakout](https://learn.adafruit.com/neokey-1x4-qt-i2c.md)
- [Automatic Naughty Cat Detector using Lobe](https://learn.adafruit.com/naughty-cat-detector-using-microsoft-lobe.md)
- [No-Code Indoor Grow Monitor with PPFD and VPD Measurements](https://learn.adafruit.com/no-code-indoor-grow-monitor.md)
- [MP3 Playback in CircuitPython with Lars the Sloth Puppet](https://learn.adafruit.com/mp3-circuitpython-lars.md)
- [AS5600 Super Smooth Rotary Encoder](https://learn.adafruit.com/as5600-smooth-rotary-encoder.md)
- [Modal MIDI Keyboard](https://learn.adafruit.com/modal-midi-keyboard.md)
- [reef-pi Guide 4: Water Level Controller](https://learn.adafruit.com/reef-pi-water-level-controller.md)
- [MatrixPortal CircuitPython Animated Message Board](https://learn.adafruit.com/matrixportal-circuitpython-animated-message-board.md)
- [Neocontroller Color Grading Input Box](https://learn.adafruit.com/neocontroller-color-grading-input-box.md)
- [Stand for Feather ESP32 with Reverse TFT](https://learn.adafruit.com/stand-for-feather-esp32-with-reverse-tft.md)
- [Tandy 1000 Keyboard to USB with CircuitPython](https://learn.adafruit.com/tandy-1000-keyboard-to-usb-with-circuitpython.md)
- [Generating Text with ChatGPT, Pico W & CircuitPython](https://learn.adafruit.com/generating-text-with-chatgpt-pico-w-circuitpython.md)
- [Ambient Color Control Pad](https://learn.adafruit.com/ambient-color-controller.md)
- [CircuitPython OLED Watch Clock](https://learn.adafruit.com/circuitpython-oled-watch.md)
- [Pick the Perfect Plant: Battery-Powered Sun Tracking](https://learn.adafruit.com/battery-powered-sun-tracking.md)
- [Sparky the Blue Smoke Monster Automaton](https://learn.adafruit.com/sparky-automaton.md)
