Makers have been building their own keyboards with USB-HID-capable microcontrollers for over ten years (see also Make 3/21). Special switches, individual keycaps, simple circuit board production and inexpensive microcontrollers make it relatively easy and inexpensive to build the keyboard as desired nowadays. Depending on the programming language used for the controller, the keyboard program must be reloaded onto the board during configuration and when the layout is to be changed. With Arduino-C ++ you even have to recompile. The PRK firmware for the Rasperry Pico.
the PRK firmware (Public Beta, Open Source) is a framework from Hasumi Hitoshi for DIY keyboards, which can be configured during runtime using a Ruby script. PRK builds up again PicoRuby which was also developed by Hitoshi. If the firmware is installed on the Pico via drag & drop, the configurations can easily be changed in a Ruby script (keyboard.rb) on the pico drive. The Raspberry Pico and the Sparkfun Pro Micro RP2040 (DEV-18288) supported.
In the Ruby script, the GPIOs of the columns and rows of the keyboard matrix are specified, here you are only limited by the number of GPIOs on the board. Then the layers of the keyboard are defined: first the letters and keyboard actions without special keys, then other layers follow, which can be reached together with key combinations or by holding down keys for a longer period of time. Of course, pressing a key on the macro keyboard can also send key combinations, macros or the results of complete Ruby functions to the computer. This opens up possibilities that normal macro keyboards can only dream of.
The PRK firmware also supports rotary encoders, RGB LEDs and debugging via the USB serial interface of the board. Support for split keyboards is under development. At the moment it is already possible to build symmetrical keyboards that are connected via UART communication. Asymmetrical or per I2C connected keyboards can be found on the roadmap.