Based on Makerdiary M60 keyboard. This is a firmware written (mostly) in python.
Document WIP
This project is refactored from Makerdiary's python-keyboard with following advantages:
- easier to port
- easier to extend
- core code and hardware dependent code decoupled
- NKRO implemented
- can easily switch to different keymaps with macros
and with following limitations:
- no pair key support
- no persistent settings(memory), but should be easy to implement
- keyboard will not connect to the last connected device after power on
- the heatmap is reseted on each boot
- no auto profile(auto switch keymaps when using a specific BT ID)
Since this is mostly a rewrite of python-keyboard, I repurposed lots of code to support the hardware or simplify the development.
Actually there's no much difference that end users can aware.
The keymaps are compatible(the code processing the keymaps are the same).
Missing features:
- pair keys
- persistent status(BT ID, heatmap are reseted on each boot)
Changed features:
- macro handlers are coroutines now, you can update yours just to add
asyncbeforedef
Improved:
- backlight update
If you are a M60 keyboard user, I'd suggest to:
- install customized firmware in
circuitpython-firmware-for-m60-keyboard - tweak the keyboard configurations in
keyboard_config.py(or do it later) - copy file/folder listed below to the FAT drive
boot.pycode.pykeyboard_config.pynkro_utils.pykeyboardkeymapsm60_matrix2
- copy the
libfolder to the drive, or install the following librariesadafruit_logging(unless you manually remove every logging line)adafruit_bleadafruit_ticksasyncio
- restart/reset the hardware
- run
microcontroller.reset()
- run
For the moment, read design.md and the comments in the source files.
For each board you want to support, you only need to implement a KeyboardHardware class with a set of methods, read design.md for more details.
3 reference implementations given:
- pure python(
m60_py) - using
keypadmodule(m60_keypad)- because
keypadprovides only a blocking method, the backlight is not fully implemented
- because
- using custom
matrix2module(support a special suspend mode)(m60_matrix2)- need to use the customized firmware