Clackety Keyboards Powered by Python
Go to file
2018-09-16 23:31:00 -07:00
.circleci Try out a linting CI config 2018-09-14 17:24:19 -07:00
boards Listen to KEY_DOWN_EVENT and KEY_UP_EVENT in the HIDHelper and actually send. Working keyboard! ⌨ 2018-09-16 23:20:16 -07:00
entrypoints Implement basic HID keyboard support (send_string works great!) 2018-09-16 20:49:47 -07:00
kmk Save a shit ton of perf, turns out making huge dicts every keystroke was AWFUL 2018-09-16 23:31:00 -07:00
vendor Add micropython vendor 2018-09-03 17:32:42 -07:00
.gitignore Make builds a bit more robust and reusable 2018-09-03 01:23:15 -07:00
.gitmodules Teensy 3.1 support 2018-09-03 17:32:42 -07:00
BOARD_SETUP.md Add license and a very basic setup script I used to bootstrap the Feathers 2018-08-30 02:54:26 -07:00
LICENSE.md Add license and a very basic setup script I used to bootstrap the Feathers 2018-08-30 02:54:26 -07:00
Makefile Misc. cleanup around the tree 2018-09-16 20:50:05 -07:00
Pipfile Niceties 2018-09-03 13:50:53 -07:00
Pipfile.lock Niceties 2018-09-03 13:50:53 -07:00
README.md Update README to reflect new thinking around the project and discoveries 2018-09-14 14:04:15 -07:00
setup.cfg Support the PyBoard v1.1 as much as the Feather was, at least 2018-09-16 00:17:30 -07:00
upy-freeze.txt Listen to KEY_DOWN_EVENT and KEY_UP_EVENT in the HIDHelper and actually send. Working keyboard! ⌨ 2018-09-16 23:20:16 -07:00

KMK

Mechanical keyboard firmware for humans (and ARM microcontrollers)

KMK is a work-in-progress and proof-of-concept firmware for (usually mechanical) keyboards, written in CircuitPython, a fork of MicroPython. This allows for high-level and expressive keyboard programming and creature comforts that C simply doesn't make easy. KMK was heavily inspired by QMK - in fact, KMK was only created because QMK didn't correctly support some hardware I bought, and hacking support in was going to be a heavy uphill battle.

This project is currently written and maintained by Josh Klar and Kyle Brown.

Supported Devices

Board Chipset Python Platform Notes
Seeed nRF52840 Micro Dev Kit nRF52840 TBD, likely CircuitPython This is basically as bleeding edge as it gets, will likely require upstream patches to uPy/CPY, but it supports everything we need at a hardware level, unlike the nRF52832.
Adafruit HUZZAH32 ESP32 CircuitPython This is the HUZZAH you actually want to build a keeb with. More lanes, more better.
pyboard v1.1 STM32F405RG (Cortex M4F) MicroPython

Support Planned/WIP

Unsupported Devices

If you don't see it in "Supported Devices", it won't work out of the box, it's basically that simple. Pull requests are welcome and encouraged to add support for new keyboards. The base requirements for device support are a port of CircuitPython or MicroPython, at least 256KB of flash storage, and USB and/or Bluetooth LE interfaces.

Here's a list of boards that seem like they should otherwise be supported, but are currently not, due to some deficiency uncovered in development/testing:

Board Chipset Python Platform Reason Unsupported
Adafruit Feather nRF52 BLE Controller nRF52832 CircuitPython Lack of USB HID (HW)
Adafruit Feather Huzzah ESP8266 CircuitPython Suuuuuper limited on GPIO lanes, Lack of USB HID (HW)
Teensy 3.2 Controller MicroPython Lack of USB HID (SW - MP)

The Great Hackaround

While it is required that at least the device talking over USB/BLE HID (the "primary brain") be from the Supported Devices list and running the primary component of KMK, it will soon be possible to build split keyboards with other, otherwise unsupported devices (currently this means a Pro Micro), either to reduce costs or to convert existing QMK boards to KMK. You'll need to flash "dummy" firmware to each Pro Micro which simply scans a matrix and passes the values over I2C to the "brain" device, which does the heavy lifting from there (including actually sending HID events).

The obvious downsides of this method are increased number of moving parts, increased number of things to flash (though the Pro Micros only need flashed when matricies change, which should almost never happen once a board is built), and all downsides that go with those points (increased power usage, etc.) The upside is that it can be a ton cheaper to build a split keyboard this way - cheapo Pro Micro clones can be had for as little as $4 CAD at time of writing, whereas a HUZZAH32, for example, is closer to $26 CAD, and to build the "traditional" way, you'd need N of them (where N is the number of split sections of your keyboard).

It is also possible to convert many QMK boards through this fashion - while untested for now, just about anything with a TRRS jack should work (Ergodoxen, just about anything from keeb.io, etc.)

This hackaround is almost certainly pointless for non-split boards.

This project, and all source code within (even if the file is missing headers), is licensed GPLv3 - while the tl;dr is linked, the full license text is included in LICENSE.md at the top of this source tree.

When contributing for the first time, you'll need to sign a Contributor Licensing Agreement which is based on the Free Software Foundation's CLA. The CLA is basically a two-way promise that this code is and remains yours, but will be distributed as part of a larger GPLv3 project. If you'd like to get it out of the way early, you can find said CLA here. If you forget, the bots will remind you when you open the pull request, no worries!