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

Pro Micro 4x4 Matrix Keypad: USB Macro Pad Build | ShillehTek

August 27, 2026 18 views

Pro Micro 4x4 Matrix Keypad: USB Macro Pad Build | ShillehTek
Project

Build a Pro Micro + 4x4 matrix keypad USB macro pad with 16 programmable hotkeys for OBS and workflows, using simple wiring and the Keypad library from ShillehTek.

30 min Beginner2 parts

Project Overview

The Simplest DIY Macro Keypad: Build a Pro Micro (ATmega32U4) + 4x4 membrane matrix keypad macro pad that shows up as a USB keyboard and triggers 16 programmable hotkeys for apps like OBS.

With two components and one library, the keypad ribbon plugs straight into the Pro Micro GPIO row so you can start sending keyboard shortcuts fast.

  • 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.
Pro Micro (ATmega32U4) connected to a 4x4 membrane matrix keypad as a 16-key USB macro pad
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 cannot 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 to 9 row. Orient it so the keypad's leftmost wire lands on GPIO 2, and the hardware is finished.

4x4 membrane matrix keypad ribbon plugged into Pro Micro pins 2 through 9
The whole circuit: the ribbon connector seats straight onto GPIO 2 to 9.
Wiring diagram showing a Pro Micro connected to a 4x4 matrix keypad using pins 2 through 9
Leftmost keypad wire to GPIO 2 - that is the only rule.

Expected result: The keypad is fully wired to the Pro Micro.

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.

Matrix keypad scanning diagram showing rows as outputs and columns as inputs
Row-by-row scanning: 4 outputs + 4 inputs = 16 distinguishable keys.

Expected result: You understand (or can skip) how matrix scanning identifies each button.

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:

Code:

#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();
  }
}
Arduino IDE sketch showing Keypad library key map and Pro Micro pin definitions for the 4x4 keypad
The keys array and pin definitions match the wiring from Step 1.

Expected result: Each button types a unique Ctrl+Alt+Shift+F-key combo.

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.

OBS Hotkeys settings screen where a Pro Micro macro keypad key combo is being assigned to an action
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 custom macro pad tailored to your workflow.

Conclusion

You built a Pro Micro + 4x4 matrix keypad USB macro pad that acts like a real keyboard and gives you 16 programmable hotkeys for OBS and other apps.

Want the exact parts used in this build? Grab them from ShillehTek.com. If you want help customizing this project or building something for your product, 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.