Keyboard as a Python Code

A keyboard designed by python only.

Similar projects worth following
Python is one of the best programming languages.
It can do everything.

So I have designed the entire keyboard, including the PCB, case, and firmware, using only Python.
No need to use Kicad and Fusion360.

It is explained on Jupyter Notebook(Google Colaboratory or binder), and you can customize it to make your own keyboard.


  • Design not only the firmware, but also the schematic (netlist), PCB, and case all in Python.
  • Mainly introduce the design flow (please read the documentation and source code for the detailed)
  • The code will be explained in a runnable jupyter notebook (google colaboratory) environment. See Build Instructions.
  • The libraries to be used are as follows
PCBpcbflow(my folk)
FirmwareKMK Firmwarecircuitpython

Why make a keyboard with Python?

Python is a programming language. It is designed with a focus on creating useful programs that are easy to write and read.

Of course, it can be extended with all kinds of libraries to create not only computer-like behaviors such as complex calculations, image processing, and machine learning, but also games, music, pictures, and anything else you can want to create. Python is used in almost anything that has the name "AI", and the image generation AI that has been making the rounds recently is also running in Python.

There are also libraries for drawing schematics, wiring PCBs, creating 3D models, and even running microcontrollers in Python.

The advantage of designing something by writing code, not just Python, is that the design is character-based information. It can be understood and designed using only a text editor without special things (schematic symbols, etc.) to be aware of. When you collaborate with someone else, you can use git's powerful version control and diff extraction, so it is easy to do so.

And since the code for the design is a program, let the computer do the complex calculations and repetition of the same values and sections. It is less mistake and easier to make changes.

  • 1 × Python environment
  • 1 × XIAO RP2040
  • 10 × Cherry MX style switch + keycap
  • 10 × SMD Diode
  • 1 × OLED module i2c

View all 4 instructions

Enjoy this project?



Daniel Dunn wrote 01/03/2023 at 03:07 point

This looks really cool!  A while back I was working on an OS/UI/App Engine for things like this in MicroPython, but never got around to doing any hardware for it.

Maybe it could be useful here?

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates