Skip to content

Latest commit

Β 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 

Repository files navigation

Custom Mechanical MacroPad

A fully programmable, custom-built mechanical shortcut keypad (MacroPad) designed to streamline workflows, trigger complex macros, and automate repetitive desktop tasks. This project integrates custom mechanical design (CAD), hardware prototyping, and low-latency embedded C++ firmware.

πŸš€ Key Features

  • Programmable Key Matrix: Utilizes an efficient matrix wiring design to maximize input counts while optimizing microcontroller GPIO pin usage.
  • Low-Latency HID Interaction: Configured as a native USB HID (Human Interface Device), sending high-speed keystrokes, shortcuts, and complex multi-key macro strings instantly.
  • Layer-Based Profiles: Supports multi-layer mapping (e.g., Layer 0 for media/OS navigation, Layer 1 for CAD/Development hotkeys) toggled seamlessly via modifier keys.

Electronics & Matrix Wiring

To keep the footprint minimal and the controller cost-effective, the key layout uses a matrix scanning technique using diodes to prevent ghosting (where pressing multiple keys simultaneously registers unintended inputs).

20251104_223808
Component Technical Specification
Microcontroller High-speed, USB-native board (e.g., Arduino Pro Micro / RP2040)
Switches Mechanical linear/tactile switches with 19mm standard spacing
Diodes 1N4148 fast-switching signal diodes for anti-ghosting matrix circuitry
Interface Wired USB-C/Micro-USB interface with native hardware support

πŸ’» Firmware Architecture

The application layer is built in modern embedded C++ and revolves around a non-blocking debounce and scan loop to capture inputs at the millisecond scale.

Key Matrix Scanning Logic:

  1. Row Strobe: Pulls a single row pin LOW or HIGH.
  2. Column Read: Checks all column pins to see if any circuit is completed by a key press.
  3. Debounce Filter: Implements a software-based interval filter (typically 5ms) to ignore the electrical noise caused by physical switch contacts bouncing upon impact.
  4. HID Transmission: Transmits the corresponding keycode array via the USB interface.
       Column 0      Column 1
          β”‚             β”‚
Row 0 ────┼───[Key]─────┼───[Key]
          β”‚   β””β”€β”€β”€β”€β–Ίβ”œβ”€β”€β”€β”˜   β””β”€β”€β”€β”€β–Ίβ”œβ”€β”€β”€
          β”‚             β”‚
Row 1 ────┼───[Key]─────┼───[Key]
          β”‚   β””β”€β”€β”€β”€β–Ίβ”œβ”€β”€β”€β”˜   β””β”€β”€β”€β”€β–Ίβ”œβ”€β”€β”€

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages