Skip to content

feat: Add RelayKeys ZMK Integration Bridge (Phase 1)#157

Open
willwade wants to merge 3 commits into
mainfrom
feat-zmk-go-bridge-4908823840962447485
Open

feat: Add RelayKeys ZMK Integration Bridge (Phase 1)#157
willwade wants to merge 3 commits into
mainfrom
feat-zmk-go-bridge-4908823840962447485

Conversation

@willwade
Copy link
Copy Markdown
Contributor

This pull request implements Phase 1 of the "RelayKeys ZMK Integration" proposal, converting standard nRF52840 dongles into high-performance software-driven BLE HID bridges.

Key Changes

  • ZMK Firmware Integration: Added firmware/zmk structure conforming to the ZMK module format, containing a standard Devicetree for a virtual/dummy matrix relaykeys_dongle shield that bypasses the hardware scanner.
  • RPC HID Injector Module: Implemented a custom C module (relaykeys_handler.c) utilizing nanopb structural decoding to register a new ZMK RPC subsystem. This handler directly catches decoded payload buffers and ships them off using zmk_endpoints_send_report().
  • Go Bridge Layer: Implemented the internal/zmkbridge package. It formats incoming RPC commands based on the SLIP-like literal framing specific to ZMK Studio (0xAB, 0xAC, 0xAD).
  • Protobuf bindings: Defined relaykeys.proto to serialize and strictly type payload messages sent to the firmware, generating internal/zmk/proto Go mappings.
  • Configurable Backend: The Go daemon configuration (internal/config/config.go & internal/rpc/server.go) now conditionally routes via FirmwareType. Legacy configurations fall back to the AT serial architecture, but those with the new ZMK dongle configuration bypass legacy constraints.

Next Steps (Phase 2)

The next task is to port mouse/consumer reports and administrative BLE management features to the host via new proto commands, as mapped out in the newly added AGENTS.md.


PR created automatically by Jules for task 4908823840962447485 started by @willwade

- Add firmware/zmk folder for building nRF52840 dongle software-driven bridge
- Add internal/zmk/proto mapping structure
- Implement internal/zmkbridge in Go for decoding and encoding serial protobufs for ZMK
- Implement relaykeys_handler.c with proper pb_decode logic for parsing messages into ZMK endpoints

Co-authored-by: willwade <229352+willwade@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

google-labs-jules Bot and others added 2 commits May 16, 2026 17:56
- Add firmware/zmk folder for building nRF52840 dongle software-driven bridge
- Add internal/zmk/proto mapping structure supporting both INJECT and ADMIN commands
- Implement internal/zmkbridge in Go for decoding and encoding serial protobufs for ZMK
- Implement relaykeys_handler.c with proper pb_decode logic for parsing messages into ZMK endpoints
- Implement web UI overhaul showing 5 slots when in Native ZMK Mode

Co-authored-by: willwade <229352+willwade@users.noreply.github.com>
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.

1 participant