The MacroPad is a Raspberry Pi-powered microcontroller with a dozen keys, a tiny OLED display, and sound. We’ll show you how it works, what you can do with it, and whether it’s worth investing in!
What Is the Adafruit MacroPad RP2040?
A macropad is a tiny keyboard, much like a standalone number keypad, but programmable to run macros, control programs, or trigger keyboard shortcuts. You can also use it to store and paste text snippets.
The Adafruit MacroPad is a 3x4 keyboard controller powered by a Raspberry Pi RP2040 chip with 264KB of RAM and 8MB of flash memory. The dual-core Cortex M0+ clocks in at around 130MHz. The MacroPad can run Circuit Python, Arduino, or MicroPython.
On the board, you’ll find the following hardware:
USB-C connector for power and data 3x4 Cherry MX-compatible mechanical key switch sockets tied to GPIO pins One NeoPixel RGB LED per switch Rotary encoder with push switch on a GPIO pin 128x64 SH1106 Monochrome OLED display 8mm speaker/buzzer STEMMA QT Connector Reset button Four M3 mounting bosses for custom enclosures
The starter kit includes the MarcoPad itself and the following parts:
12 x Kailh mechanical key switches 12 x clear keycaps for MX compatible switches 1 x Adafruit MacroPad bottom plate 1 x 3x4 mechanical keyboard plate 1 x D-shaft skirted rubber knob for the rotary encoder 4 x M3 5mm machine screws 4 x rubber feet
The bottom plate has two beautifully designed sides, and you can choose which side you’d occasionally prefer to look at, i.e. you can mount it with either side facing down.
If you prefer to use your own keys or build a custom enclosure, you don’t have to get the complete starter kit, but can instead purchase the MacroPad by itself.
How to Set Up the MacroPad RP2040
Setup is easy as π. Well, actually it’s a lot easier. We followed Adafruit’s MacroPad RP2040 guide to learn about the hardware and setup.
The guide includes detailed step-by-step assembly instructions, which helped us get up and running in no time. Essentially, you add a couple of switches to the key switch plate, then connect the switches with the plate to the board, plug in the remaining switches, screw in the optional backplate, mount the keycaps and rubber knob, and it’s done.
Now you’re ready to install CircuitPython or set up Arduino IDE. We wanted to use our MacroPad for running keyboard shortcuts and pasting text, so we installed CircuitPython. We’ll skip a detailed summary here, since Adafruit has done an excellent job covering every aspect of the process, including setup of the recommended code editor (Mu Editor), and how to edit your first code. It’s beginner-friendly, and, being noobs ourselves, we had no issues following the instructions.
What’s important to know is this:
“Installing” CircuitPython is a matter of launching the MacroPad’s RPI-RP2 drive by holding two specific buttons, then dragging-and-dropping the CircuitPython UF2 file onto that drive. Super simple. You’ll need to use a USB cable suitable for data transfers to connect your MacroPad to your computer. If the RPI-RP2 drive doesn’t show up, chances are you used a charge-only USB cable. You don’t need to know how to code! While it’s beneficial to know some coding, better yet Python, you can do a lot with simple edits of existing code. We’ll show you a few examples below.
How to Use the MacroPad
The best thing about microcontrollers these days is that you can draw from a wealth of existing code. The Adafruit MacroPad comes with a bunch of pre-installed macros, for example, to control Adobe Photoshop or Illustrator, play tones, use it as a number pad, mouse, and more. You can switch between the different macros using the rotary encoder.
If you’re looking for something else, you can download additional code libraries for free and edit the code as you wish. Lacking coding skills, we applied a few simple customizations to the existing macros.
Create an Off “Macro”
Each of the dozen keys carries a customizable LED, which can be visually pleasing and, together with the OLED display, helps you navigate the keys. If you want to turn the LEDs off without unplugging the MacroPad, you’ll have to create a suitable “off” macro.
We copied one of the default macros into a new tab on Mu, named the file “0 off.py” (0, so it’s the default macro on startup), and edited the code to display OFF as its name and turn off all LEDs.
Add Boilerplate Text
To create a boilerplate macro, we again copied a default macro to a new tab in Mu and edited it to our liking. Note that in addition to the key sequence, you can also edit individual LED colors and the label shown on the MacroPad’s OLED display.
Pair the MacroPad With AutoHotkey on Windows
The MacroPad is perfect for running multi-key keyboard shortcuts with a single click. But what if you want to do something a little more complicated, like resizing a window to specific dimensions, but you have no clue how to code this in Python? You could either learn Python (we’re still trying), or you could stumble upon an easy workaround. Enter AutoHotkey.
AutoHotkey (AHK) is a free, open-source scripting language for Windows. You can use it to remap keys or buttons, define hotkeys, or create scripts for various tasks. The beauty of AHK is, that it adds another huge collection of free scripts to your toolbox, and you can easily pair it with the MacroPad.
We found a simple AHK script to resize windows to specific dimensions, which is useful for taking screenshots. We customized our AHK file and moved it to the Windows Startup folder (press Windows key + R, enter shell:startup, and hit Enter), so it would always run. Each AHK script also defines the keyboard shortcut used to run the script. Next, we added this keyboard shortcut to our MacroPad macro, including a suitable label. And now we can resize windows at the touch of a button.
If this made you curious about AHK, don’t miss our AutoHotkey guide.
Should You Buy the Adafruit MacroPad RP2040?
The Adafruit MacroPad RP2040 is a must-have tool for anyone who’s got a few repetitive computer tasks to automate or simplify. Whether you’re editing media using keyboard shortcuts, regularly pasting boilerplate text or special characters, or need a Numpad on your laptop, the MacroPad can do it all.
You no longer have to remember keyboard shortcuts because you can program everything into a single keystroke. Paired with the OLED display, you don’t even have to remember which of the twelve keys to hit, since you can associate a descriptive label with each one.
We loved the simplicity of the MacroPad. It’s incredibly easy to set up and a joy to look at. While you will have to edit code to customize it, you don’t need to know how to code. Since it comes with a good selection of pre-installed macros, you can get up and running in short order.
If you know how to code in Python, the sky is the limit. You’ll appreciate the vast collection of libraries available for the RP2040, and you’ll end up doing the coolest stuff with the MacroPad.
You’ll find more fancy and cheaper macro pads out there, or you could build a DIY macro pad, but keep in mind that the Adafruit MacroPad RP2040 is fully customizable out-of-the-box, lets you switch between multiple keyboard layouts using the rotary encoder, and comes with an OLED screen, among other useful features. It’s a powerful tool we no longer want to be without.