Skip to content
Buy 10+ on select items — save 10% auto-applied
Free US shipping on orders $35+
Order by 3pm ET — ships same-day from the US
Skip to main content

The Simplest DIY Macro Keypad: Pro Micro + 4x4 Matrix (16 Programmable Keys)

August 27, 2026 2 views

Project

Project Overview The Simplest DIY Macro Keypad: Two components, zero soldering decisions, one library — a 4x4 matrix keypad plugs straight into an Arduino Pro Micro's GPIO row and becomes a 16-button USB macro pad for OBS scene switching, editing shortcuts, or any hotkey-hungry app.

30 min Beginner2 parts

Project Overview

The Simplest DIY Macro Keypad: Two components, zero soldering decisions, one library — a 4x4 matrix keypad plugs straight into an Arduino Pro Micro's GPIO row and becomes a 16-button USB macro pad for OBS scene switching, editing shortcuts, or any hotkey-hungry app.

  • Time: ~30 minutes
  • Skill level: Beginner
  • What you will build: A programmable USB keypad that types Ctrl+Alt+Shift+F-key combos (or anything else) at the touch of a button.
DIY macro keypad built from a Pro Micro and 4x4 matrix keypad
Sixteen macros from two parts — it really is this simple.

Parts List

From ShillehTek

External

  • Micro-USB cable

Note: This build only works on boards with native USB support like the ATmega32U4 (Pro Micro, Leonardo). A classic Uno or Nano can't emulate a keyboard — the Pro Micro is the trick that makes it two-component simple.

Step-by-Step Guide

Step 1 — Plug the Keypad Into the Pro Micro

Goal: Complete the entire wiring in one move.

What to do: The keypad's 8-pin connector plugs directly onto the Pro Micro's GPIO 2–9 row — no breadboard, no jumper spaghetti. Orient it so the keypad's leftmost wire lands on GPIO 2, and the hardware is finished.

4x4 keypad ribbon plugged directly into the Pro Micro headers
The whole circuit: the ribbon connector seats straight onto GPIO 2–9.
Wiring diagram for the macro keypad
Leftmost keypad wire to GPIO 2 — that's the only rule.

Expected result: Done wiring. Really.

Step 2 — How the Matrix Works (Optional Theory)

Goal: Understand how 8 pins read 16 buttons.

What to do: The four row pins are outputs and the four column pins are inputs. The Arduino drives each row high in turn while reading the columns; when a pressed button connects a live row to a column, the row/column pair identifies exactly which key it was. The Keypad library handles all of this scanning for you.

Diagram of matrix keypad row and column scanning
Row-by-row scanning: 4 outputs + 4 inputs = 16 distinguishable keys.

Expected result: Matrix scanning demystified (or skipped — your call).

Step 3 — Install the Library and Flash the Code

Goal: Turn key presses into keyboard macros.

What to do: In the Arduino IDE, install the Keypad library by Mark Stanley and Alexander Brevig from the Library Manager, grab the sketch from the author's GitHub, select Arduino/Genuino Micro as the board, and upload. The core of the sketch:

#include <Keypad.h>
#include <Keyboard.h>

const byte ROWS = 4;
const byte COLS = 4;
char keys[ROWS][COLS] = {
  {'1','2','3','A'},
  {'4','5','6','B'},
  {'7','8','9','C'},
  {'*','0','#','D'}
};
byte rowPins[ROWS] = {2, 3, 4, 5};
byte colPins[COLS] = {6, 7, 8, 9};

Keypad keypad = Keypad(makeKeymap(keys), rowPins, colPins, ROWS, COLS);

void sendMacroCommand(uint8_t key) {
  Keyboard.press(KEY_LEFT_CTRL);
  Keyboard.press(KEY_LEFT_ALT);
  Keyboard.press(KEY_LEFT_SHIFT);
  Keyboard.press(key);
}

void loop() {
  char key = keypad.getKey();
  if (key) {
    switch (key) {
      case '1': sendMacroCommand(KEY_F1); break;
      case '2': sendMacroCommand(KEY_F2); break;
      // ...one case per button, F1-F12 plus a-d
    }
    Keyboard.releaseAll();
  }
}

Expected result: Each button now types a unique Ctrl+Alt+Shift+F-key combo — combinations nothing else on your system uses.

Keypad library configuration in the sketch
The keys array and pin definitions match the wiring from Step 1.

Step 4 — Bind the Buttons in OBS

Goal: Put the pad to work as a stream deck.

What to do: In OBS, open Settings → Hotkeys, click the field for the action you want (switch scene, mute mic, start recording), then press a key on your macro pad — OBS records that combo as the trigger. Repeat for every scene and toggle you use.

Assigning macro keypad buttons in OBS hotkey settings
Click a hotkey field, tap a keypad button, done — a DIY stream deck.

Expected result: One-touch scene switching and source toggling in OBS.

Step 5 — Make It Yours

Goal: Go beyond F-keys.

What to do: Any button can type any sequence: swap a sendMacroCommand() call for Keyboard.press(KEY_LEFT_CTRL); Keyboard.press('c'); and you have a copy key (Ctrl+V for paste); use Keyboard.print("your text") to type whole snippets. Editing shortcuts, game binds, a one-button "thank you for the follow" — 16 keys, your rules.

Expected result: A fully custom macro pad tailored to your daily workflow.

Conclusion

This is the rare project where the bold claim holds: two parts, one plug-in connection, one library, and you own a 16-key programmable macro pad. It's a perfect first HID project — and a genuinely useful desk tool you'll keep using long after the novelty wears off.

Want the exact parts used in this build? Grab them from ShillehTek.com. If you want help customizing this project, check out our IoT consulting services.

Credits

All photos and images in this tutorial are credited to Brian Lough on Hackster.io. The original guide by Brian Lough served as the reference for this ShillehTek version. We thank him for his excellent work in the maker community.