KMK: Harnessing the Potential of Open Source and CircuitPython to Energize Mechanical Keyboards

Within the realm of computer keyboards, a remarkable open-source firmware called KMK has surfaced, captivating enthusiasts from all corners. KMK possesses a potent capability to revolutionize mechanical keyboards into personalized instruments, enabling users to venture into uncharted territories of customization and productivity.

KMK Open Source Mechanical Keyboard Firmware Written in CircuitPython

CircuitPython is an open-source programming language that runs on microcontrollers used in various embedded applications, including mechanical keyboards like ANAVI Macro Pad 12 and ANAVI Arrows from our crowdfunding campaign at Crowd Supply. Built upon the foundations of Python, CircuitPython is specifically crafted to cater to the requirements of resource-limited embedded devices housing microcontrollers. One of the standout merits of CircuitPython lies in its user-friendly nature and effortless adaptability, particularly beneficial for newcomers who may not possess extensive coding expertise.

ANAVI Arrows and ANAVI Macro Pad 12 with the open source firmware KMK written in CircuitPython

The source code of KMK is readily available on GitHub, released under the GPLv3 license. The inception of KMK can be traced back to 2018. Notably, the KMK source code follows a coding style that employs the Python code formatter, known as Black, and embraces the usage of single quotes.

KMK firmware runs on Raspberry Pi RP2040 microcontoller which is in the core of Seeed Studio XIAO RP2040 module

The hardware requirements for microcontrollers to run KMK are: a minimum of 256KB of flash storage, support HID over USB and/or Bluetooth, CircuitPython version 7.0 or newer. With its impressive hardware capabilities, the Raspberry Pi RP2040 microcontroller is a perfect fit for CircuitPython and KMK. Because of this we selected Seeed Studio’s XIAO module with RP2040 for ANAVI Macro Pad 12 and ANAVI Arrows.

KMK offers many key features:

  • Key Mapping: Customize key assignments to suit individual preferences
  • Macros: Create and assign macros for automating tasks or executing commands
  • Layers: Define multiple virtual layers for accessing different functions or modes
  • LED Control: Customize backlighting and LED behavior
  • Rotary Encoder: Rotary encoders for various functions like volume control or scrolling.
  • Mini OLED Display: Compatibility with mini OLED displays, allowing users to display custom information or visuals on their keyboards
Back-light and under-light effects with KMK firmware on the mechanical keyboards ANAVI Macro Pad 12 and ANAVI Arrows

KMK supports many mechanical keyboards, including ANAVI Macro Pad 12 and ANAVI Arrrows. Although you are free to change to another firmware at any time, both ANAVI Macro Pad 12 and ANAVI Arrrows out of the box will come with KMK pre-installed.

Transforming Keyboard Customization: Unleashing the Potential of Hot-Swappable Sockets

A standout feature of the ANAVI Macro Pad 12 and ANAVI Arrows is their seamless switch swapping capability, allowing you to tailor your typing experience on the go! With utmost ease and no need for soldering, thanks to the convenient hot-swappable sockets integrated into the printed circuit board, anyone can effortlessly remove a switch from its socket and replace it with another compatible switch.

This revolutionary feature provides several benefits to keyboard enthusiasts and users who like to customize their typing experience. It allows for easy experimentation with different switch types, enabling users to find the switch that suits their preferences best. It also simplifies switch replacement, making it more convenient to replace a faulty switch or try out different switches without needing specialized soldering equipment or skills.

Basically the whole key is like a sandwich: hot-swappable socket, mechanical switch and a keycap. All kits with ANAVI Macro Pad 12 and ANAVI Arrows include Gateron red mechanical switches. However thanks to the hot-swappable sockets you can experiment with various options of clicky, tactile and linear Cherry MX compatible mechanical switches from different brands with various tech specs and colors: red, blue, brown, green, silver, etc.

The printed circuit boards of ANAVI Macro Pad 12 and ANAVI Arrows are designed with Kailh hot-swap sockets on the back. These sockets are for surface-mount technology (SMT) assembly. To provide backlight on the front of the printed circuit boards there is a separate LED under each mechanical switch. We decided to make both of these keyboards with north-facing switches, aka the LED on each key is on the top (north) part of the switch. Furthermore, there are WS2812B addressable LEDs on the back. All these LEDs combined with the translucent keycaps included in the kit create awesome light effects when the keyboard is turned on. The open source firmware KMK allows fine tuning of the lights.

Although, as you can see in the video it is possible to hand-solder the sockets, this is appropriate only for a prototype. For manufacturing the keyboards ordered from the crowdfunding campaign we have hired a trusted local factory and they will do a professional lead-free assembly of all components. Using these hot-swappable sockets and SMT LEDs there is no need of manual hand soldering of any mechanical switches. This significantly simplifies and speeds up the manufacturing process. The end result is better quality and lower price.

Our crowdfunding campaign has a very modest goal of just $1. It will help us make the keyboards in my hometown Plovdiv, Bulgaria, EU thanks to the trusted supply chain we have established throughout the years. Order ANAVI Macro Pad 12 or ANAVI Arrows to get a cool mechanical keyboard and help us bring these entirely open source hardware projects to life!

Introducing ANAVI Macro Pad 12 and ANAVI Arrows

We are back with two brand new fully programmable, open source, hot-swappable compact mechanical keyboards: ANAVI Macro Pad 12 and ANAVI Arrows. The crowdfunding campaign is now live at Crowd Supply!

ANAVI Arrows and Macro Pad 12


Both ANAVI Macro Pad 12 and ANAVI Arrows feature high-quality gold-plated circuit boards designed with the free and open source software KiCad. These compact keyboards are driven by the Seeed Studio XIAO RP2040 with Raspberry Pi RP2040 microcontroller, ensuring top-notch performance. Equipped with a USB-C connector and a charming mini yellow-blue OLED display, they combine functionality with visual appeal. Thanks to the popular open-source KMK firmware written in CircuitPython, personalizing keyboard layouts and macros becomes a breeze.

ANAVI Arrows

Import your typing experience with our bright and shiny compact mechanical keyboards, made in Plovdiv, Bulgaria, EU. Support our crowdfunding campaign and help us bring these unique and high-quality open source keyboards to life.

Improving the Firmware of ANAVI Macro Pad 10, ANAVI Knobs 3 and ANAVI Knob 1

There are two different options for mechanical keyboard open source firmware for ANAVI Macro Pad 10, Knobs 3, and Knob 1: KMK and QMK. Both of which have been getting upgrades recently!

KMK is a feature-rich and beginner-friendly open source firmware for mechanical keyboards, written in CircuitPython, which comes preloaded on the Macro Pad 10 and Knobs 1 and 3. The source code is available on GitHub under the GPLv3 license. So… if you have code suggestions to make it better, just open a GitHub pull request. This is exactly what Stefan Misch recently did, by improving the encoder resolution.

ANAVI Macro Pad 10, ANAVI Knobs 3 and ANAVI Knob 1

Huge thanks to Stefan for his valuable contribution to the upstream of KMK! If you own Macro Pad 10, Knobs 3, and Knob 1, please consider upgrading the KMK firmware on your mini mechanical keyboard to get his fix.

In other news: the GitHub pull request that adds support for ANAVI Knobs 3 was finally merged in QMKQMK stands for Quantum Mechanical Keyboard. It is probably the most popular firmware for mechanical keyboards and supports literally hundreds of devices, including ANAVI Macro Pad 8 and our other mechanical keyboards. The source code is available under GPLv2 license and written in C. Initial support for the Raspberry Pi RP2040 microcontroller in QMK was added in September 2022. We started the porting efforts in October, and shortly after that, patches for ANAVI Macro Pad 10 and Knob 1 were merged. However, it took almost 6 months to merge the GitHub pull request for ANAVI Knobs 3. The long wait is over: now all of our mini mechanical keyboards are supported by QMK!

ANAVI Knobs 3

The community is very important and makes all the difference in any open source project. Thank you for supporting and improving our open source hardware mechanical keyboards!

Macro Pad 10, Knobs 3 and Knob 1 are OSHWA-Certified!

Great news! The Open Source Hardware Association (OSHWA) has officially certified ANAVI Macro Pad 10, ANAVI Knobs 3 and ANAVI Knob 1. OSHWA is a non-profit entity registered in the US that organizes the annual Open Hardware Summit and maintains the Certified Projects Directory.

ANAVI Macro Pad 10, ANAVI Knobs 3, ANAVI Knob 1
ANAVI Macro Pad 10, ANAVI Knobs 3, ANAVI Knob 1

As part of the certification program, OSHWA ensures that the definition of “open source hardware” used by a specific project (in our case in these 3 mini mechanical keyboards) matches the community’s definition of open source hardware. They provide a unique identification number (UID) for each version of the certified open hardware device based on the country code and a number. So now we have:

The prefix BG is the country code for Bulgaria, because all these mini mechanical keyboards are made in my hometown of Plovdiv, Bulgaria. As truly and entirely open source projects, we also go one step further. Only free and open source software has been used to design the printed circuit board, the stickers, the firmware, and the documentation. In previous updates we explained how we use KiCad for designing the printed circuit boards and the open source firmware QMK and KMK written in CircuitPython.

ANAVI Macro Pad 10
ANAVI Macro Pad 10

One more thing: this year’s open source hardware summit will be held in New York on April 28 and 29th. You can attend remotely and in person. So make sure to mark the dates on your calendar!

ANAVI Macro Pad 10 & Knobs Shipping Soon

Happy New Year and best wishes for 2023! January starts with good news. All Macro Pad and Knobs kits were shipped to Crowd Supply’s warehouse for distribution.

In the coming weeks, all orders placed during the crowdfunding period will enter into Crowd Supply’s fulfillment system and will be processed soon. Shipping to all backers should begin shortly. After that ANAVI Macro Pad 10, ANAVI Knobs 3 and ANAVI Knob 1 will be in stock at Mouser and Crowd Supply.

Thank you for supporting open source hardware products like ANAVI Macro Pad 10, Knobs 3 and Knob 1! W’ll keep posting updates with technical information and we hope you will have a lot of fun with your new gear!

Is CircuitPython Suitable for Mechanical Keyboards?

Is CircuitPython suitable for mechanical keyboards? Yes, absolutely!  KMK firmware for mechanical keyboards is writen in CircuitPython and we use it of ANAVI Macro Pad 10 and Knobs.

ANAVI Knob 1, ANAVI Knobs 3 and ANAVI Macro Pad 10

1991 was a remarkable year for computer science and the open source movement. On February 20th, Guido van Rossum released the first version of Python and then, several months later on August 25th, then 21-year old Linus Torvalds announced the first version of what would become Linux. Now, 31 years later, both projects are more popular than ever!

ANAVI Knob 1, ANAVI Macro Pad 10 and ANAVI Knobs 3

Python is a general-purpose programming language. It supports both object-oriented programming and structured programming which makes Python suitable for a broad range of tasks. MicroPython and CircuitPython are Python 3 variants optimized for constrained devices, primarily microcontrollers. MicroPython appeared in 2014. Three years later, in July 2017, MicroPython was forked into another open source project called CircuitPython. There are some differences, most notably that each of them supports a different set of hardware devices.

CircuitPython is very simple to use. The idea is for it to be accessible to students and beginners. Its development is supported by Adafruit Industries. CircuitPython runs on Raspberry Pi RP2040 microcontrollers and, as you know from our previous update, ANAVI Macro Pad 10, ANAVI Knobs 3 and ANAVI Knob 1 all rely on the XIAO module from Seeed Studio with RP2040.

ANAVI Macro Pad 10

A classical mechanical keyboard consists of keys (mechanical switches with keycaps) wired to a microcontoller. There are a huge variety of models, variants, and manufacturers of mechanical switches. For example, the ANAVI Macro Pad 10 comes with Gateron red mechanical switches, but the hot-swap sockets allow you to actually use any other kind of Cherry MX compatible switch. Firmware on the microcontroller maps the keys to specific characters.

Hot-swap mechanical switches on ANAVI Macro Pad 10

In general, a microcontoller has a limited number of GPIO (general-purpose input/output) pins, so the keys are most commonly organized in a matrix. For example, ANAVI Macro Pad 10 is designed with a three-by-three matrix which only requires six GPIO pins instead of nine. The role of the firmware is to detect when a key is pressed and then send a specific character or sequence of characters (i.e., a macro) to the computer.

Front and back of ANAVI Macro Pad 10

Ease of use combined with the power of the RP2040 makes CircuitPython a very good programming framework for implementing mechanical keyboard firmware. Of course CircuitPython is not as fast as C. However this is not a problem for the RP2040 because it is a dual-core Arm Cortex-M0+ processor with a clock running up to 133 MHz. Furthermore RP2040 has 264kB on-chip SRAM – more than enough for keyboard firmware. Thanks to the powerful microcontoller, it is easy to get started and customize keyboard behavior directly by altering the CircuitPython source code. There is no need to install complex toolchains or to cross-compile the source code. With KMK, it is easy to edit the source code in CircuitPython on pretty much any operating system, no matter if you are a Microsoft Windows, MacOS or a GNU/Linux user.

Of course, since ANAVI Macro Pad 10, ANAVI Knobs 3 and ANAVI Knob 1 are entirely open source projects, you have the freedom to replace the default firmware with whatever you like, no matter if it is KMK, QMK or anything else!

ANAVI Macro Pad 10 & Knobs are Funded!

The launch of our crowdfunding campaign was a blast! ANAVI Macro Pad 10, ANAVI Knobs 3, and ANAVI Knob 1 were all fully funded and all stretch goals were met in the first week. Thanks to all backers and Crowd Supply for bringing life to these three entirely open source projects!

As part of the covered stretch goals, each kit will include stickers from ANAVI Technology and KiCad, the free and open source CAD software used for designing the printed circuit boards of the keyboards. Furthermore, ANAVI Macro Pad 10 kits will include 32 super-cool emoji stickers. You can stick them on the top or sides of the translucent keycaps. Last but not least, we’ll be publishing various video tutorials to ensure getting started is easy.

One more thing… Recently, our mini mechanical keyboards were featured in an article by CNX Software. This is a very popular website with news and tutorials about embedded systems, makers, and open source hardware. It was started in 2010 by Jean-Luc Aufranc. By the way it is worth keep an eye on CNX Software because there are always news about interesting gadgets!

ANAVI Macro Pad 10 and Knobs are Here!

One, two, three new products! After several months of development we are happy to present you 3 new open source hardware mini mechanical keyboards and knobs. The crowdfunding campaign started on Monday!

ANAVI Knob 1, ANAVI Knobs 3 and ANAVI Macro Pad 10

ANAVI Macro Pad 10, ANAVI Knobs 3 and ANAVI Knob 1 all come with gold-plated black printed circuit boards, Raspberry Pi RP2040 microcontrollers, USB-C connector and clickable rotary encoders. The popular open source KMK firmware allows you to easily program and configure custom keyboard layouts and macros using CircuitPython.

ANAVI Knobs 3

Once again we rely on Crowd Supply for the crowdfunding. The campaign has a very modest goal of just $1 and it has been already funded. Our plan is to make the keyboards in Plovdiv, Bulgaria, EU thanks to the trusted supply chain we have established throughout the years. We hope you will jump in and help us bring these entirely open source mechanical keyboards to life!

ANAVI Knob 1, ANAVI Macro Pad 10 and ANAVI Knobs 3

ANAVI Macro Pad 2 in a Home Automation Control Center

Do you remember our tiny keyboard with just 2 keys called ANAVI Macro Pad 2? Recently AE Chadwick used ANAVI Macro Pad 2 in his amazing home automation control center for his 1939 Minimalist Cottage.

ANAVI Macro Pad 2 in a Home Automation Control Center
ANAVI Macro Pad 2 mounted below a Stream Deck

AE Chadwick ran new wiring straight up into the ceiling and through one wall to connect to his home media server. Stream Deck is the primary interface and ANAVI Macro Pad 2 fits below it. Our open source hardware 2-key keyboard has a simple but important task in this complex setup to perform the feature ” “tap any key to wake the computer.”

3D printed parts to hold ANAVI Macro Pad 2

AE Chadwick also designed a panel cut with CNC and 3D printed parts to hold the electronic gadgets. He was kind enough to share his experience in a Crowd Supply Field Report.

AE Chadwick, thank you for using ANAVI Macro Pad 2 and for sharing details about your project with us! It looks amazing!