Mini Emoticon Keyboard




Introduction: Mini Emoticon Keyboard

About: Ted hails from sunny California, and is definitely not a robot created by Silicon Valley scientists. He enjoys collecting tools, components, and devices, and has amassed quite a collection (mainly through du...

Do you use emoticons?

Do you ever wish you could have a button to quickly and easily type an emoticon?

Well, look no further because I'll show you how to make a mini emoticon keyboard with a keyboard switch tester, an adafruit trinket board, and a 3d printed case.

Step 1: What Is It Exactly?

This is a mini keyboard based off the adafruit trinket that lets you easily type silly faces. The trinket can also be modified to type other words, phrases, or symbols; move the mouse; or act as a MIDI input.

However, for this project I only wanted to make a little keyboard to help me quickly type these faces, and that's what I'll show you how to make.

Step 2: Switch Tester

This project was born because I had an extra switch tester laying around. What is a switch tester you say? Well, a switch tester helps you test switches (well, duh...). More specifically, it helps you choose what switch type to use in your keyboard. You can buy mechanical keyboards which use high quality switches for a better typing experience, and I purchased this switch tester to decide which switch to get before shelling out the big bucks on a fancy new keyboard.

So now I had this device with six switches laying around. So I decided to make something cool with it! And I also wanted to quickly type emoticons and some of the switches in the tester are super cool (very clicky).

If you have a spare switch tester laying around somewhere, I recommend doing this project! If you don't, you could still use an ordinary push button switch, order cherry mx switches, or find some other way of triggering the trinket.

Step 3: Cutting the Frame

For this project, I only wanted two buttons so I needed to cut off the rest. I first removed the switches from the metal frame, then marked where the cut would be. I then got my friend to cut it at that location, because why not make your friends do your work for you, right?

Step 4: Clean Up the Edges

The dremel cutting wheel was used to smooth the edges.

Sharpie was then used to color match the now shiny silver ends with the black anodization on the rest of the frame.

Step 5: Electronics!

For this project I will be using an Adafruit Trinket, a cool little board I only just learned about. (link:

It's a very affordable ($6.95 at the time of this posting) board, similar the official Arduino boards, that allows you to easily program a microcontroller (in this case the ATTiny85) with the Arduino IDE. You only need a mini-USB* cable, which most people have lying around anyway. Because of the low size and small cost of this board, it's great for embedding in projects for very rapid prototyping (it was perfect for this project!)

It has 5 I/O pins, and three available if you're communicating over USB. It also has 8k of RAM, analog inputs and outputs, and USB bootloader. We'll be using the bootloader to load code onto the device.

*These now ship with a micro-USB connector; I had one that had been purchased earlier so it was mini-USB.

Step 6: Electrical Assembly

Now it's time to solder!

Each switch has two metal pins that stick out, and these become electrically connected to each other when the switch is depressed. In order for the Trinket to understand that this happens, it needs to change the state of the pin. So one pin of each switch is connected to ground, and the other connected to an input pin on the Trinket. In our program, we tell the trinket to normally keep that pin high, so that if the switch is pressed it brings it low and it can sense it, triggering it to send data to our computer.

How it works:

switch pressed -> switch pins connected -> Trinket pin brought to ground -> Trinket sends signals to computer

What you need to solder:

  • One black wire that connects one pin of switch 1 to one pin of switch 2 to GND on the Trinket.
  • Each of the remaining pins on the switches go to pins 0 and 2 on the Trinket.

And that's it! No more connections to make (besides plugging in the USB cable). It's as simple as that!

Step 7: Designing the Case

I decided to make a nice case for it, because why not! First, I covered the Trinket board in some spare heatshrink I had lying around to electrically insulate it from the ground and switch wires (you could also wrap it in electrical tape).

Next, I measured the metal frame with some calipers and modeled it in a 3D CAD program, in this case Solidworks (though you could use any other suitable program for this project). I created my case so that it would slide in from the top, and added a hole for the USB connector and sent it to my friend's 3D printer (thanks Ashley!).

Step 8: Print It!

Use your 3d printer, find a friend has one, or find a nearby makerspace to 3d print the case.

Step 9: Programming the Trinket

Programming the Trinket is fairly simple, though it could be confusing if you're new to Arduino and/or have limited experience with computers.

Adafruit has written a very nice tutorial here:

But I'll also go over some of the important steps below.

1. Read the adafruit tutorial (it's well made and thorough)

2. Install the trinket HID library from this link:

(this lets you use your trinket as a mouse, keyboard, or midi device. You could make almost anything out of this board, very easily and cheaply!)

You'll need to drag the folder TrinketKeyboard into your libraries folder, which is most likely "Documents/Arduino/Libraries" (Mac) or "My Documents\Arduino\Libraries" (Windows). Quit the Arduino program and open it again.

You should also be able to add a library from a .zip file by going to

Sketch->Include Library->Add .ZIP Library

3. Download the arduino sketch from the following link:

4. Upload the code to the Trinket with the following steps:

  • Select Tools->Programmer->USBTinyISP in the Arduino IDE
  • Press the reset button or unplug/replug the trinket USB cable
  • Flash the code by pressing Upload within the next 10 seconds (a red LED will be pulsing during this window of time)
  • Your code should be uploaded!

Step 10: Computer Setup (Mac Only)

Follow the steps above for a mac. You have to set your keyboard settings to use unicode hex input, which lets you type special characters with alt-codes.

The Windows OS has this native, so this step isn't necessary for windows. However, I wrote this specifically for my OSX based computer, so if you use linux or windows you'll probably have to change the code a bit in order to type the emoticons you want.

I used the following website: to help find the correct codes to use for each special characters.

Step 11: Customization! Make Your Keyboard Do Anything You Want

Feel free to modify the code to type anything you want.

I had novelty keycaps for the "lenny" and the "are you serious" face so I made it type those faces when pressed. (I got them through a massdrop here:

You can have it print anything you want. Just have it call the functionTrinketKeyboard.print("your text here")

instead of print_serious() or print_lenny() in the main loop and you're set! Your imagination is the limit here!

You're done!

That's it, now you have a working mini emoticon keyboard, that lets you type faces with the touch of a button. Make sure to view the example video in the first step if you want to see how it's like in use, and visit my website at or look at my instructables profile for more of my projects.



    • Creative Misuse Contest

      Creative Misuse Contest
    • Fix It! Contest

      Fix It! Contest
    • Metalworking Contest

      Metalworking Contest

    23 Discussions


    Question 4 months ago

    could I make this for my Android, What is the key limit, and could I use the Arduino Uno or leonardo

    quick question please? how many keys it can support please?(adafruit trinket) thanks

    1 reply

    emoticonkeys.ino:7:29: fatal error: TrinketKeyboard.h: No such file or directory

    compilation terminated.

    Error compiling.

    please help me to solve this

    Really Cool project! hope you make more great ideas

    this is great I want to design a mini clicking keyboard for osu to eliminate bulk and this is perfect thanks for sharing

    1 reply

    This is pretty damn brilliant! :D
    What make and model is your cute little keyboard? I kiind of want one!

    1 reply

    It's custom; you'll just have to follow the instructable and make one yourself!

    Ok... I'm an electronic tech (CET), I've been doing computer in one form or another since 1978, and I'm a bit of an all-around geek. Never heard of a switch tester before today. Seriously. So I researched... and found out they were for testing the feel of the Cherry MX type switches... I saw a whole bunch of different colors and thought, "What's up with that?"

    So... I finally found out about the differences: CHERRY MX SWITCH TYPES.

    Now I got it... and I've learned something for when I go looking for switches in projects... so thanks for that!

    Overall... great instructable! I like the ability to hit one key and have it type some text. Could be useful for other things like frequently typed commands, logon names, or similar things.

    1 reply

    Thanks, glad I helped you learn something new!

    And you're totally right, this project could be modified just slightly to type almost anything; the sky's the limit!

    You could probably make a whole keyboard with just emoticons on it and sell them. I myself don't own a 3D printer and I am not that computer savvy but I want one. One with a lot of emoticons on it. Great instructable, thank you

    Very nice; I think this is a great use for the Trinket. Well done!



    2 years ago

    Hi I'm having a problem with the code, I think I installed all the libraries correct. It gives me this error:

    This report would have more information with

    "Show verbose output during compilation"

    enabled in File > Preferences.

    Arduino: 1.0.6 (Windows 7), Board: "Arduino Uno"

    In file included from C:\Users\TIM\Documents\Arduino\libraries\TrinketMouse\usbdrvasm_includer.S:24:

    C:\Users\TIM\Documents\Arduino\libraries\TrinketMouse\/usbdrv/usbdrvasm.S:17:1: warning: "__SFR_OFFSET" redefined

    In file included from c:/program files (x86)/arduino/hardware/tools/avr/lib/gcc/../../avr/include/avr/io.h:99,

    from C:\Users\TIM\Documents\Arduino\libraries\TrinketMouse\/cmdline_defs.h:26,

    from C:\Users\TIM\Documents\Arduino\libraries\TrinketMouse\usbdrvasm_includer.S:22:

    c:/program files (x86)/arduino/hardware/tools/avr/lib/gcc/../../avr/include/avr/sfr_defs.h:141:1: warning: this is the location of the previous definition

    In file included from C:\Users\TIM\Documents\Arduino\libraries\TrinketMouse\usbdrvasm_includer.S:24:

    C:\Users\TIM\Documents\Arduino\libraries\TrinketMouse\/usbdrv/usbdrvasm.S:384:34: error: No such file or directory

    Could you help me out?!

    Really love your instructable though.

    2 replies

    It does the same with \Trinketkeyboard\

    You have the board type set to "Arduino Uno". The Trinket uses a different CPU (the ATTiny85), so the CPU-dependent code won't work. The Uno doesn't have the direct-to-USB connection that some Arduinos (like the Leonardo) do, so it can't be used for this project.

    It will probably work with the Leonardo-flavored Arduinos, but you might have to tweak the code for the different CPU (I haven't tried any ATTiny85 projects, so I'm not familiar with the differences. Ladyada is a real pro, so she might already have written the code so it will work with the Leonardos, too). The simplest thing would be to just buy a Trinket from Adafruit. If you want to use a Leonardo-style Arduino, you can get them cheap on ebay. I got some micro-sized ones for about $5 apiece from a US seller. You have to be careful when shopping for them, because the naming is really confusing: there are "Mini", "Micro", and "Nano" boards that are not the same hardware. Some of them have the ATMega32U4 chip with the direct USB interface, but most of them use an FTDI chip, or a CH340 chip, for the USB like the older Arduinos do. If there's a chip on the bottom of the board in the illustrations, it's probably the FTDI or CH340.

    You might also need to upgrade your Arduino IDE to a 1.6.x version: I don't remember when they added support for the newer chips like the ATTiny85 and the 32U4, but I think it was after 1.0.6.

    Yes, you can. ATiny85 or 32u4 will work. The Nano v3 will not.

    thnx for answring me
    so i can just upload the same code to the arduino and it will work ok i?

    thnx for answring me
    so i can just upload the same code to the arduino and it will work ok i?