A cross-platform macro deck that lets you configure 9 buttons to launch websites or executables via Arduino hardware. Includes volume control and media playback via rotary encoder.
# Install Python dependencies
pip install pyserial pynput
# Start the serial listener
python main.py
# Configure buttons (in another terminal)
cd consoledeck-cli && go build -o deck && ./deck- 9 programmable buttons (launch URLs or executables)
- Media controls (play/pause)
- Volume control via rotary encoder
- Mute toggle
- Terminal UI for configuration
- Cross-platform (Windows, Linux)
- Arduino (Uno, Nano, or compatible)
- 9 momentary buttons
- 1 media button
- Rotary encoder with push switch
- Python 3.x
- Go 1.20+ (for the configuration TUI)
git clone https://github.com/yourusername/console_deck.git
cd console_deckpip install pyserial pynput- Open
arduino_worker/arduino_worker.inoin the Arduino IDE - Select your board and port
- Upload the sketch
cd consoledeck-cli
go build -o deckThe main application runs as a headless daemon that listens for Arduino input:
python main.pyThe listener will auto-detect your Arduino on any available serial port.
Use the terminal UI to configure what each button does:
cd consoledeck-cli
./deckOr build and run in one step:
cd consoledeck-cli && go build -o deck && ./deckTUI Controls:
| Key | Action |
|---|---|
| Arrow keys / j/k | Navigate buttons |
| Enter | Edit selected button |
| Tab | Cycle button type (link/exe/none) |
| t | Test button action |
| Esc | Cancel editing |
| q | Quit |
The configuration is stored in config.json. The TUI looks for it in:
DECK_CONFIGenvironment variable./config.json(current directory)~/consoledeck/config.json
{
"BUTTON_1": {
"type": "link",
"value": "https://youtube.com"
},
"BUTTON_2": {
"type": "exe",
"value": "/path/to/application"
},
"BUTTON_3": {
"type": "none",
"value": ""
}
}Action types:
link- Opens URL in default browserexe- Launches executablenone- No action (button disabled)
| Component | Pin |
|---|---|
| Button 1 | 6 |
| Button 2 | 7 |
| Button 3 | 8 |
| Button 4 | 9 |
| Button 5 | 10 |
| Button 6 | 11 |
| Button 7 | 12 |
| Button 8 | A0 |
| Button 9 | A1 |
| Media Button | 2 |
| Encoder CLK | 5 |
| Encoder DT | 4 |
| Encoder SW (mute) | 3 |
All buttons should be wired with pull-up resistors (or use INPUT_PULLUP in firmware).
Arduino not detected?
- Check that the Arduino is connected and the correct drivers are installed
- On Linux, you may need to add your user to the
dialoutgroup:sudo usermod -a -G dialout $USER
Buttons not responding?
- Verify the Arduino is running the correct firmware
- Check wiring connections
- Ensure the serial listener is running (
python main.py)
Volume/media keys not working?
- On Linux, ensure
pynputhas the necessary permissions - You may need to run as root or configure uinput permissions
MIT