Build a Simple Macro Pad

by Basheer bk in Circuits > Microcontrollers

729 Views, 5 Favorites, 0 Comments

Build a Simple Macro Pad

IMG_20250211_154707309.jpg
macropad.png
IMG_20250211_133440274~2.jpg
IMG_20250211_133528312.jpg

Welcome to this Instructables ! In this guide, we’ll build a simple 3-key macro pad using a Raspberry Pi Pico. This project is designed to be minimalistic—unlike most macro pads, it doesn’t require a custom PCB. Instead, we’ll assemble everything on a dot board (perf board), making it an easy and accessible DIY build.


A macro pad is a great way to streamline workflow by assigning frequently used shortcuts to dedicated keys. For example, you can map one key to CTRL+C for quick copying. When pressed, the Pico will send the corresponding key combination to your computer, just like a standard keyboard.


In my setup, I’ve programmed shortcuts for essential functions, but you can easily customize the keys to suit your needs—whether for productivity, gaming, or creative software.

Supplies

IMG_20250207_112915517.jpg
IMG_20250207_194917019.jpg
IMG_20250207_113225020.jpg

To make this project, I used:


Raspberry Pi Pico

Push button x 3

dot board

breadboard and jumper wire

Acrylic sheet


Soldering iron

flux

soldering led

other essential tools

Vscode IDE (optional)

Flashing Circuit Python on the Raspberry Pi Pico

bootstel.jpeg
Screenshot (14).png
Screenshot (15).png

For flashing First, download the Circuit Python UF2 file from the official website.

Then, enter bootloader mode by holding the BOOTSEL button while plugging the Pico into your computer via USB.

Once it appears as a drive named RPI-RP2, simply drag and drop the UF2 file onto it. The Pico will reboot and appear as CIRCUITPY, indicating that Circuit Python is successfully installed.

For more detailed steps click here.

Adding Adafruit Circuit Python Library

FMYMFE3M70HSJSG.png
Screenshot (16).png

Next, we need to add the Adafruit Circuit Python HID library to enable keyboard functionality.

First, download the Circuit Python Library Bundle from github.

https://github.com/adafruit/Adafruit_CircuitPython_Bundle

Extract the file, find the adafruit_hid folder inside the lib directory, and copy it to the lib folder on the CIRCUITPY drive. This library allows the Pico to act as a keyboard, sending keypresses to the computer

Programming the Pico

FMYMFE3M70HSJSG.png
Screenshot (17).png

For the programming part, I used VS Code as the IDE. First, open VS Code and connect your Raspberry Pi Pico. Then, navigate to the CIRCUITPY drive and create a new file named code.py. Copy and paste the provided code into this file and save it.

Downloads

Initial Testing

single-button-wiring.png
IMG_20250207_113050676.jpg
VID-20250206-WA0014(1)2[1].gif

Here, i have used a breadboard, push button and jumper for initial testing. i have copied hello text and when i press the button, it's pasting the text. So everything is working.

Soldering

multiple-button-wiring.png
IMG_20250207_195936605.jpg
IMG_20250207_211632011.jpg
IMG_20250207_211613941.jpg

First i have soldered the female header pins to the dot board. then three push buttons are place according to the GPIO pin position. i have used GPIO 15,7,0. So i connected the pins to push button pins and GND pins are also connected.

Program Edits

key_mappings = [
[Keycode.CONTROL, Keycode.C], # Copy (Ctrl + C)
[Keycode.CONTROL, Keycode.Z], # Undo (Ctrl + Z)
[Keycode.CONTROL, Keycode.V] # Paste (Ctrl + V)

Maps each button to a keyboard shortcut. and Uses Ctrl+C for copy, Ctrl+Z for undo, and Ctrl+V for paste. change these keys and add your own short keys



For changing GPIO pins:-

button_pins = [board.GP15, board.GP7, board.GP0]
buttons = []

Desinging Case

IMG_20250207_220212344.jpg
IMG_20250210_163214408.jpg
IMG_20250210_230420390.jpg
Screenshot (18).png
Screenshot (19).png

After all the soldering, i thought of setting up some type of wooden base. i used small piece of wooden log and cut a piece out of it. but it did not look pretty. The fact is there is no makerspaces in my home town to get access of any 3d printers. anyway i thought to design a case as an experiment. i used a CAD software and designed a simple case. suddenly i got an idea to make case out of acrylic. i took the design to nearby cnc shop and cut down the case, but it was a flop due to some dimensional errors of the top part.

Final Outcome

Simple Macro pad using pico
IMG_20250211_153229536.jpg

I used the other parts and thought to kept it as a DIY design rather than a enclosure case. The key take away from this project is, i have learned a lot about HID interference and designing.