Skip to content

About

Transform a simple Arduino keypad into a powerful productivity tool that executes commands, hotkeys, and macros at the press of a button.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

ย 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

โšก Action Pad

Your Physical Shortcut to Digital Productivity

License: MIT Arduino Python PRs Welcome

Transform a simple Arduino keypad into a powerful productivity tool that executes commands, hotkeys, and macros at the press of a button.

Features โ€ข Quick Start โ€ข Demo โ€ข Configuration โ€ข Contributing


๐Ÿ‘๏ธ Demo

Action Pad Demo

A button that executes the command google-chrome & code to open the browser and VS Code, improving efficiency.


โœจ Features

โœ… Custom Button Actions
Assign commands, hotkeys, or macros to each button

โœ… Multi-Layer Support
Expand functionality without adding hardware

โœ… Short & Long Press
Double your actions with press duration detection

โœ… Command Execution
Run any terminal command instantly

โœ… Hotkey Automation
Trigger complex key combinations effortlessly

โœ… Macro Chaining
Combine multiple actions into workflows

โœ… Plug & Play
Auto-detects Arduino devices

โœ… JSON Configuration
Easy-to-edit, human-readable config


๐Ÿค” Why Action Pad?

As developers, designers, and power users, we constantly switch between applications, execute repetitive commands, and trigger the same hotkey combinations dozens of times a day. Action Pad was born from frustration with this inefficiency.

The Problem

  • โฑ๏ธ Repetitive keyboard shortcuts slow you down
  • ๐Ÿง  Remembering complex key combinations is mentally taxing
  • ๐Ÿ’ป Context switching breaks your flow
  • ๐Ÿ”„ Running the same terminal commands over and over is tedious

The Solution

A physical, programmable button pad that puts your most-used actions at your fingertips. One button press can:

  • Launch your entire development environment
  • Copy text and send a notification
  • Switch between different workflow "modes"
  • Execute complex multi-step macros

It's like having a custom control panel for your digital life. ๐ŸŽฎ


๐Ÿš€ Quick Start

Prerequisites

  • Arduino board (Uno, Nano, Mega, etc.)
  • 4x4 matrix keypad (or any compatible keypad)
  • Python 3.6+
  • Arduino IDE

Installation

1. Clone the repository

git clone https://github.com/HimC29/action-pad.git
cd action-pad

2. Install Python dependencies

pip install pyserial pyautogui

3. Wire your keypad to Arduino
Connect keypad pins to Arduino digital pins (see Wiring Guide)

4. Upload Arduino code

  • Open /code/arduino/main/main.ino in Arduino IDE
  • Select your board and port
  • Click Upload โฌ†๏ธ

5. Configure your buttons

# Edit config.json to customize button actions
nano config.json  # or use your favorite editor

6. Launch Action Pad

# Linux/macOS
./launch.sh

# Windows
launch.bat

7. Select your Arduino from the menu and start pressing buttons! ๐ŸŽ‰


๐Ÿ”Œ Wiring Guide

Matrix keypads typically have 7-8 pins that connect to Arduino digital pins.

Connection Steps

  1. Connect all keypad pins to Arduino digital pins
  2. Check your keypad's datasheet for the correct pin order (or experiment!)
  3. Update the Arduino code if your mapping differs from the example

Example Pin Mapping (4x4 Keypad)

Keypad Pin  โ†’  Arduino Pin
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Pin 1       โ†’  D2
Pin 2       โ†’  D3
Pin 3       โ†’  D4
Pin 4       โ†’  D5
Pin 5       โ†’  D6
Pin 6       โ†’  D7
Pin 7       โ†’  D8
Pin 8       โ†’  D9

๐Ÿ’ก Tip: Different keypads may have different pin configurations. If buttons don't respond correctly, try adjusting the pin assignments in /code/arduino/main/main.ino.


โš™๏ธ Configuration

Action Pad uses a simple JSON file to define button behaviors. Edit config.json to customize your setup.

Configuration Structure

{
    "active_layer": "default",
    "layers": {
        "default": {
            "btn1": { /* button config */ }
        }
    }
}
  • active_layer - The layer that loads on startup
  • layers - Contains all your layer definitions

Button Action Types

๐Ÿ”น Hotkey

Trigger keyboard shortcuts

"btn1": {
    "type": "hotkey",
    "keys": ["ctrl", "c"],
    "long": {
        "type": "hotkey",
        "keys": ["ctrl", "v"]
    }
}

๐Ÿ”น Command

Execute terminal commands

"btn2": {
    "type": "command",
    "command": "google-chrome"
}

๐Ÿ”น Macro

Chain multiple actions together

"btn3": {
    "type": "macro",
    "actions": [
        {
            "type": "hotkey",
            "keys": ["ctrl", "c"]
        },
        {
            "type": "command",
            "command": "notify-send 'Copied!'"
        }
    ]
}

๐Ÿ”น Layer Switch

Change to a different button layout

"btn16": {
    "type": "layer",
    "target": "code-mode"
}

Complete Example

Click to expand full config.json example
{
    "active_layer": "default",
    "layers": {
        "default": {
            "btn1": {
                "type": "macro",
                "actions": [
                    {
                        "type": "hotkey",
                        "keys": ["ctrl", "c"]
                    },
                    {
                        "type": "command",
                        "command": "notify-send --app-name='System' 'Copied text!'"
                    }
                ],
                "long": {
                    "type": "macro",
                    "actions": [
                        {
                            "type": "hotkey",
                            "keys": ["ctrl", "v"]
                        },
                        {
                            "type": "command",
                            "command": "notify-send --app-name='System' 'Pasted text!'"
                        }
                    ]
                }
            },
            "btn2": {
                "type": "command",
                "command": "google-chrome",
                "long": {
                    "type": "command",
                    "command": "firefox"
                }
            },
            "btn16": {
                "type": "layer",
                "target": "code-mode"
            }
        },
        "code-mode": {
            "btn1": {
                "type": "command",
                "command": "google-chrome & code"
            },
            "btn16": {
                "type": "layer",
                "target": "default"
            }
        }
    }
}

๐Ÿค Contributing

Contributions make the open-source community an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated!

How to Contribute

  1. Fork the Project
  2. Create your Feature Branch
    git checkout -b feature/AmazingFeature
  3. Commit your Changes
    git commit -m 'Add some AmazingFeature'
  4. Push to the Branch
    git push origin feature/AmazingFeature
  5. Open a Pull Request

Contribution Ideas

  • ๐ŸŽจ Add new action types (mouse movements, delays, conditionals)
  • ๐Ÿ–ฅ๏ธ Build a GUI configuration tool
  • ๐Ÿ“š Improve documentation and examples
  • ๐Ÿ› Report bugs and suggest features via Issues

๐ŸŒŸ Contributors

Thanks to everyone who has contributed to Action Pad!

Want to see your name here? Check out the Contributing section!


๐Ÿ—บ๏ธ Roadmap

  • Additional action types (mouse control, delays, conditionals)
  • Web-based GUI configuration tool
  • Support for ESP32 and Raspberry Pi Pico
  • Profile switching for different workflows
  • Cloud sync for configurations
  • Mobile companion app

Have an idea? Open an issue and let's discuss!


๐Ÿ“„ License

Distributed under the MIT License. See LICENSE for more information.

TL;DR: You can use, modify, and distribute this project freely. Just keep the original license notice.


๐Ÿ™ Acknowledgments

Built with amazing open-source tools:

  • Arduino - The hardware platform that makes this possible
  • pyserial - Python serial communication library
  • pyautogui - GUI automation for Python

โญ Star this repo if you find it useful!

Made with โค๏ธ by HimC29

Report Bug โ€ข Request Feature โ€ข Discussions

About

Transform a simple Arduino keypad into a powerful productivity tool that executes commands, hotkeys, and macros at the press of a button.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages