Fundamentals 5 min read

Open‑Source Python Keyboard with USB and Bluetooth Using CircuitPython

This article introduces an open‑source, solder‑built keyboard that runs CircuitPython on a microcontroller, explains the hardware assembly, firmware flashing, library installation, and Python‑based key‑mapping to create a customizable USB/Bluetooth keyboard for productivity and gaming.

Python Programming Learning Circle
Python Programming Learning Circle
Python Programming Learning Circle
Open‑Source Python Keyboard with USB and Bluetooth Using CircuitPython

The project, hosted on GitHub, provides a hand‑soldered keyboard that runs Python code via AdaFruit's CircuitPython (a lightweight MicroPython variant) on a board with 256 KB flash and 16 KB RAM.

Step 1 details the physical modification: removing keycaps, wiring keys with solder, and attaching the CircuitPython‑capable control board to the keyboard.

Step 2 covers programming the Pitaya Go module, flashing the CircuitPython firmware, and preparing the device for USB/Bluetooth operation.

Step 3 instructs downloading the adafruit‑ble and adafruit‑hid libraries and placing them in the CIRCUITPY/lib directory.

Step 4 explains copying the custom code.py (and supporting keyboard.py , keycodes.py ) to the board, after which the keyboard becomes fully programmable.

Using Python for key‑mapping enables easy customization, such as tap‑key functions, dual‑key shortcuts, and remapping keys like D to navigation, H/J/K/L to arrow keys, and U/N to PageUp/PageDown, enhancing the productivity of a 60% keyboard.

The community response on Hacker News and Twitter highlights the novelty of running Python on a keyboard, while the author acknowledges performance limits (≈4 ms matrix scan) but stresses rapid prototyping advantages over C implementations.

PythonOpen SourcekeyboardembeddedCircuitPythonkey-mapping
Python Programming Learning Circle
Written by

Python Programming Learning Circle

A global community of Chinese Python developers offering technical articles, columns, original video tutorials, and problem sets. Topics include web full‑stack development, web scraping, data analysis, natural language processing, image processing, machine learning, automated testing, DevOps automation, and big data.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.