First prototype setup.
Simple matrix keyboard driver written in python running on raspberry pi pico. Split keyboards supported. Currently in functional alpha status, IE not really been in proper use yet.
I wanted to try if it would be possible to write a matrix keyboard driver in python. And yes, it seems like it is possible since the raspberry pi pico is quite fast for a microcontroller - 133 Mhz. Adafruit's circuitpython comes with USB HID support and it was very easy to get a matrix keyboard driver up and running.
- Layers
- Mouse support
- Multikeys - one key on keyboard results in several keys being send
- Split keyboard via UART (Four cables needed)
- Split keyboard autodetetion of master/slave half
- Connect rows and columns wires to GPIOs like any other home-made keyboard. You can use all exposed GPIOS except GPIO1 and GPIO2.
- Connect GND between the picos - For example pin 38
- Connect VSYS between the picos - Pin 39
- Connect UART TX Pin 1 to UART RX Pin 2 on the other pico
- Connect UART RX Pin 2 to UART TX Pin 1 on the other pico
- Create your own layout by editing
config_left.py
(orconfig_right.py
) jomk will first try to loadconfig.py
, thenconfig_right.py
, and lastconfig_left.py
- Install circuitpython on one (or two for split keyboard) raspberry pi pico. I use version 7.0.0
- Download the circuitpython libaries and copy the folder
adafruit_hid
including all files tolib
on your pico(s). - copy
keyboard_defines.py
,main.py
and eitherconfig_left.py
orconfig_right.py
to the pico(s) Only one config file per pico.
If you create a file named debug
some debug prints will be printed and the LED will be lit when a keypress is detected.
- Multimedia keys
- Hold down for temporary layer change + tap for another key
- Switch layer for one keypress
- Macro recording and playback
- Mouse acceleration
- Check pin config vs layout config at start
- You can't use a jomk based keyboard in BIOS. Some additional code is (needed](https://circuitpython.readthedocs.io/en/latest/shared-bindings/usb_hid/index.html) I have not bothered to add it.
- The USB HID descriptor is circuitpythons default. I've not yet seen any reason for writing my own.
- circuitpython does not support the usage of the second core. It would have been very nice to have the matrix scanning on one core and the USB handling on the other.
MIT