Keyboard Emulator
Raspberry Pi Pico (RP2040) · USB HID · 22 Buttons + Rotary Encoders + Joystick · Macro Scripting · Cross-Platform GUI Config
Overview
The Keyboard Emulator is a customisable USB HID device that converts physical inputs — push buttons, rotary encoders, and an analog joystick — into programmable keyboard actions, media controls, and macro sequences. To any host computer, it appears as a standard USB keyboard. No special drivers are required on Windows, macOS, or Linux.
Applications include custom CNC machine operator panels (feed-rate override knobs, cycle start/stop, axis jog buttons), accessibility control panels, video editing consoles, streaming controller decks, and industrial HMI panels. The device is programmed via a cross-platform Python GUI configuration tool; no embedded programming knowledge is needed.
The firmware implements software debouncing (≈5 ms), quadrature decoding for rotary encoders, configurable joystick deadzone, and OS-specific macro scripting. Configuration is stored persistently in flash — the device retains its programming across power cycles and can be re-programmed via USB serial without reflashing firmware.
Key Features
- Up to 22 push buttons — any GPIO GP0–GP22, active-low, internal pull-up
- Multiple rotary encoders — configurable CW/CCW actions (key, scroll, macro)
- Analog joystick — D-pad emulation or HID gamepad axes mode
- Macro scripting — multi-keystroke sequences with delays
- OS-specific macros — Windows, macOS, Linux variants
- Flash-persistent config — survives power cycles
- USB HID — works on all OSes, no drivers needed
- Cross-platform config GUI — Python, Windows/macOS/Linux
- Programming mode auto-detection — no manual switches
Specifications
| Microcontroller | Raspberry Pi Pico (RP2040) |
|---|---|
| USB Interface | USB HID — appears as standard keyboard |
| Digital Inputs | Up to 22 buttons (GP0–GP22, active-low) |
| Rotary Encoders | Up to 10 (2 pins each, A/B quadrature) |
| Analog Joystick | X/Y on ADC0/ADC1 (GP26/GP27), button on GPIO |
| Joystick ADC | 12-bit, 0–4095, configurable deadzone 10–30% |
| Joystick Modes | Digital (D-pad) or Analog (HID Gamepad) |
| Debounce | ~5 ms software debounce on all digital inputs |
| Configuration Tool | Python 3.8+, Tkinter GUI (Windows/macOS/Linux) |
| Config Storage | Flash-persistent (survives power cycle) |
| Host Compatibility | Windows, macOS, Linux — no drivers required |
| Power Supply | USB 5V, bus powered |
Build Your Custom Control Panel
Ideal for CNC operator panels, HMI consoles, and accessibility devices. Contact us for custom layouts and bulk orders.