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.

You may also like

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!

You may also like