Keygram — Telegram-Controlled USB Keyboard
A Raspberry Pi Pico W that bridges Wi-Fi and USB, letting a Telegram chat remotely type, trigger hotkeys, and wake a host PC.
Project Overview
Keygram turns a Raspberry Pi Pico W into a remote USB keyboard: plugged into a host computer over USB and connected to Wi-Fi, it polls a Telegram bot and translates incoming chat messages into real keystrokes, hotkeys, and even a remote wake signal for a sleeping PC.
Features
- Keyboard Emulation: Simulates a standard US keyboard over USB using Adafruit HID.
- Telegram Bot Control: Polls the Telegram API and dispatches chat commands to native keyboard actions.
- Remote Wake: Wakes a suspended host PC via
usb_hid.remote_wakeup()combined with a modifier key tap. - Status LED: The onboard Pico W LED shows connectivity at a glance — solid when connected, flashing while a command is received.
- Fault Tolerance: Automatic Wi-Fi reconnection and proactive garbage collection to avoid SSL-related memory crashes on the constrained hardware.
Commands
| Command | Syntax | Description |
|---|---|---|
/start | /start | Shows the help menu and available commands |
/wake | /wake | Sends a USB remote-wake signal and key tap |
/key | /key <name> | Presses and releases a single key (e.g. enter, esc, gui) |
/type | /type <text> | Types out a full ASCII string |
/combo | /combo <modifier> <key> | Triggers a hotkey shortcut (e.g. ctrl c, gui r) |
Technical Details
- Runs on a Raspberry Pi Pico W flashed with CircuitPython (v8.x+).
- Built on the
adafruit_hidandadafruit_requestsCircuitPython libraries.