Skip to content

Conversation

@replicaJunction
Copy link
Contributor

Summary

Add the following features to the ZMK module for the Keyboardio Preonic:

  • Support for ZMK Studio
  • Support for rotary encoders
  • Support for the butterfly LEDs

Update the default keymap to match the default keymap provided in the box with the Preonic more closely.

This doesn't quite bring the ZMK implementation to feature parity with Kaleidoscope, but it does reduce the feature gap quite a bit.

Note

Per the clean room documentation on ZMK, I have NOT reviewed any QMK or Kaleidoscope source code to inform these changes. The pinout is clearly articulated here under the MIT license, and the rest of this information came from other users, ZMK docs, the Zephyr docs, and trial and error.

Additionally, to the extent of my ability according to the licenses of this repository, my contributions here are explicitly provided under the terms of the MIT license.

Details

ZMK Studio

Add support for ZMK Studio for the Preonic module. This allows users to store and adjust keymaps without recompiling firmware.

Support has been added for both the MIT and the Ortho layouts, but since the keyboard ships with the MIT layout by default, I selected that as the default physical layout. (My keyboard uses the ortho / full-grid layout, so I haven't gotten a true test of the MIT layout; however, to the best of my ability, it seems to work as expected.)

Screenshots

Available layouts:
image

Layer template:
image

Rotary Encoders

Add support for rotary encoders on the keyboard.

Once again following the principle of least surprise, I wired up all of the available sockets, but by default, I chose to enable only the single encoder that ships with the keyboard.

Butterfly LEDs

Note

Huge thanks to @ujl123 for getting this working!

Add support for the beautiful butterfly LEDs. ZMK uses the "RGB Underglow" feature for any addressable RGB LEDs, so that's the feature in use here. ZMK users can customize this using the RGB Underglow behavior in their keymaps.

I personally think the "swirl" effect looks absolutely great on this butterfly!

Default Keymap

Rewrite the default keymap to align fairly closely with the laminated card shipped with the Preonic. A couple layers aren't exact (mouse keys especially) but it's fairly close. Obviously, users can adjust this however they like, but this may help ease the barrier of entry for people that just want to get something working.

Testing

How Have I Tested This?

I've updated my own ZMK config to point to my fork and this branch of this ZMK module, so I've been dogfooding the changes as I've made them. I'm actually typing this PR on the Preonic!

How Can Reviewers Test This?

Assuming reviewers already have the version of this module in main, update build.yml to point to my fork and branch:

# - name: keyboardio-preonic-zmk-module
#   remote: keyboardio
#   revision: main
- name: keyboardio-preonic-zmk-module
  remote: replicaJunction
  revision: zmk-studio

Then build the keymap as normal.

What Haven't I Tested?

The main thing I have not tested is that I have not tried ZMK Studio with a board using the default 2u spacebar. Having converted my board once, I just don't feel the urge to undo the change, test that feature, and then redo the change all over again.

I have set my keyboard to that layout and confirmed that the left "space" key fires correctly, and the other keys are still mapped as they should be. Based on my reading, I think that's the expected behavior, but I haven't actually tested it.

Final Thoughts

Once again, special thanks to @ujl123 for writing the LED code. They'd also written working encoder code before I got around to submitting my version.

Additionally, thanks to @petejohanson for their work getting so much of ZMK working on the Keyboardio Preonic!

Rewrite the default keymap to bring it more closely in line with the
factory default keymap from Keyboard.io. I used the laminated reference
sheet included with that keyboard as a reference.

Signed-off-by: Joshua T <[email protected]>
Shoutout to @ujl123 - they did most of the work on this! See also:

keyboardio/keyboardio-preonic-zmk-config#1
Signed-off-by: Joshua T <[email protected]>
@obra
Copy link
Member

obra commented Aug 6, 2025

Amazing. Thanks!

@obra obra merged commit 3d52e9b into keyboardio:main Aug 6, 2025
4 checks passed
@replicaJunction replicaJunction deleted the zmk-studio branch August 6, 2025 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants