English | 中文 |
---|
From a hand-wired USB & Bluetooth keyboard powered by Python to production.
The Python keyboard works so well thanks to MicroPython and CircuitPython.
Follow the guide - hand-wiring-a-keyboard.md to rapidly make a keyboard with 100 lines of Python code.
With putting more time into the Python keyboard, we find it more and more interesting. We think a Python keyboard can make a big difference, so we decide to design a new keyboard for everyone. Check out the M60 mechanical keyboard.
As the 60% keyboard lacks a lot of keys (F1~F12, arrow keys and etc). We can add features like TMK's layers and composite keys to make the small keyboard much more powerful. With the idea of Toward a more useful keyboard to keep our fingers at the home row, we can optimize the keyboard to make us more productive.
Adding the Tap-key feature, which is holding a key down to activate an alternate function, can make a big difference.
Taping d outputs d (press & release quickly), holding d down activates navigation functions.
- d + h as ←
- d + j as ↓
- d + k as ↑
- d + l as →
- d + u as PageUp
- d + n as PageDown
To apply the navigation d, copy keyboard.py
and action_code.py
to the USB drive of the keyboard, and then modify code.py
to import the new keyboard
# code.py
from keyboard import main
main()
Simultaneously pressing two keys (interval less than 25ms) activates an alternate function.
Use ; as a MODS_TAP key, taping ; outputs ;, holding ; down outputs Ctrl.
A C module matrix
of keyboard matrix is written to reduce latency and improve power efficiency. To use it, import CMatrix
into keyboard.py
:
from matrix import Matrix as CMatrix
then replace
matrix = Matrix()
with
matrix = CMatrix()
The module is included in the firmware firmware/circuitpython-6.0.0-alpha.1-m60-20200720.uf2
.
Make sure the firmware is used when using the C module. If you are interested, you can build it from circuitpython/tree/m60.
- add macro
- add system keys and cosumer keys
- add mouse keys
- add RGB backlight