4-key macro keypad.

Similar projects worth following
This project started as a proof-of-concept for a planned future project.

It's a programmable macro keypad with the following features:
- 4x mechanical key-switches (gateron blue).
- LED backlit keys with variable brightness controlled by a push-button on the base.
- USB 2.0 HID compliant with a USB-C connector.
- Keys can be configured as regular keystrokes, media keys or macro strings.

Now that it's complete, I use it as a music media controller.

The PCB was designed with KiCAD and fabricated by JLCPCB.  Components are all SMD except for the key-switches, LEDs, USB-C connector and ISP header.

Firmware was coded in C and drew from Dean Camera's LUFA library.

The "enclosure" consists of a spotted gum frame cut with a roman ogee router bit and a clear plexi base.  The spotted gum was chosen to match the base of another project that I use to control PC volume.

The brightness control tact switch can be accessed through the plexi base.

I tried out a few key-caps as seen in the photos - some chrome arrow caps transparent caps, blank black caps and black shine-through media keys which I ultimately settled on.

The keys are configured by modifying the keymap.c file in the source code.  A few example configurations can be seen here.

Portable Network Graphics (PNG) - 647.26 kB - 11/17/2020 at 21:20


Graphics Interchange Format - 1.79 MB - 11/15/2020 at 00:49


  • 1 × AVR AtMega32U4 microcontroller
  • 1 × 16mhz crystal
  • 2 × 22pf capacitor Crystal load caps.
  • 1 × 1uF capacitor UCAP (for AVR USB)
  • 1 × 10uF capacitor USB connector decoupling.

View all 16 components

View project log

Enjoy this project?



Piotr-GitHub wrote 02/06/2021 at 15:52 point

Hi. I read about  your project and it's great and inspiring! :) I would like to follow your footsteps in this mattter but I would like to make 12  keys of such shortcuts. I don't know if it's worth it but I thought about putting arduino bootloader on it or even change atmega to esp8266 with micropython on it but I'm not sure if it's worth it (or maybe in future versions, like with BLE). This is such as inspiring project. Also, what key caps did you use? Do you have a place where it can be custom made?

  Are you sure? yes | no

clewsy wrote 02/21/2021 at 21:46 point

Hello @Piotr-GitHub thanks for your kind words.  Good luck with your build - using arduino seems to be a popular method for implementing HID gadgets.  Here is where I found the media keycaps that I am using:

  Are you sure? yes | no

Piotr-GitHub wrote 02/22/2021 at 08:32 point

Thank you. I will check on that. :)

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates