feat: keybars community module for QMK #1

Merged
jwarykowski merged 5 commits from feat/module into main 2026-11-01 13:01:28 +00:00
Owner

A QMK community module (jwarykowski/keybars) for keybars Pro: it lights keys over raw HID and lets the app arm keys, so pressing an armed W runs an action instead of typing w.

  • keybars/keybars_core.c: the protocol with no QMK in it (HELLO, PING, MAP, LEDS, CLEAR, ARM, DISARM, STREAM; ACTION and KEY back). See docs/protocol.md.
  • keybars/keybars.c: the QMK side. process_record_keybars (which QMK runs before the keymap's own) swallows an armed key's press and release; rgb_matrix_indicators_advanced_keybars paints the app's colours over the board's effect; housekeeping_task_keybars lets everything go when the app is quiet for 3 seconds.
  • Safety: arming lasts 1 to 60 seconds and fires once; at most 16 keys; modifiers, layer keys and QK_BOOT on the base layer are never armed, plus keybars_never_arm_user.
  • VIA isn't supported directly (both answer raw HID); the build stops with how to forward reports.
  • example/zsa_moonlander: the Moonlander's default keymap with the module, which builds against QMK master (68 KB, checked locally in the qmk_cli container).
  • CI: the core tests with clang's ASan and UBSan, and the Moonlander build.

The app side (a driver that finds a board answering HELLO, and actions on Notify rules) comes next in keybars-pro.

A QMK community module (`jwarykowski/keybars`) for keybars Pro: it lights keys over raw HID and lets the app arm keys, so pressing an armed W runs an action instead of typing w. - `keybars/keybars_core.c`: the protocol with no QMK in it (HELLO, PING, MAP, LEDS, CLEAR, ARM, DISARM, STREAM; ACTION and KEY back). See `docs/protocol.md`. - `keybars/keybars.c`: the QMK side. `process_record_keybars` (which QMK runs before the keymap's own) swallows an armed key's press and release; `rgb_matrix_indicators_advanced_keybars` paints the app's colours over the board's effect; `housekeeping_task_keybars` lets everything go when the app is quiet for 3 seconds. - Safety: arming lasts 1 to 60 seconds and fires once; at most 16 keys; modifiers, layer keys and `QK_BOOT` on the base layer are never armed, plus `keybars_never_arm_user`. - VIA isn't supported directly (both answer raw HID); the build stops with how to forward reports. - `example/zsa_moonlander`: the Moonlander's default keymap with the module, which builds against QMK master (68 KB, checked locally in the `qmk_cli` container). - CI: the core tests with clang's ASan and UBSan, and the Moonlander build. The app side (a driver that finds a board answering HELLO, and actions on Notify rules) comes next in keybars-pro.
feat: keybars community module for QMK
Some checks failed
CI / firmware (pull_request) Failing after 6s
CI / test (pull_request) Failing after 8s
2a8e77eeb3
Lights keys for keybars Pro over raw HID and hands it the presses of keys
it has armed instead of typing them: an armed key's press and release
never reach the computer, the board sends ACTION with its row and column,
and the key disarms. Arming lasts at most 60 seconds, modifiers and layer
keys are never armed, and with nothing from the app for 3 seconds every
key and LED goes back to normal.

The protocol lives in keybars_core.c, apart from QMK, with tests run on
the computer under ASan and UBSan; keybars.c is the QMK side. CI also
builds the Moonlander's default keymap with the module.
ci: build the firmware only when run by hand
Some checks failed
CI / firmware (pull_request) Has been skipped
CI / test (pull_request) Failing after 7s
50f96b1008
ci: test with the runner's gcc
All checks were successful
CI / firmware (pull_request) Has been skipped
CI / test (pull_request) Successful in 8s
1d222d368e
fix: cap the app's colours at the keyboard's brightness limit
All checks were successful
CI / firmware (pull_request) Has been skipped
CI / test (pull_request) Successful in 8s
47c38ccd20
Colours set from rgb_matrix_indicators skip RGB_MATRIX_MAXIMUM_BRIGHTNESS,
which the keyboard's own effects keep to, so lighting every key white
could draw more current than the board allows. The module now scales its
colours to that limit.
ci: build the firmware on each tag, on both QMK trees (#2)
All checks were successful
CI / firmware (pull_request) Has been skipped
CI / test (pull_request) Successful in 8s
a4cc9cec99
Builds the firmware on each tag, so a tag the builder pins has compiled first.

- scripts/firmware.sh builds example/zsa_moonlander with this checkout's module on QMK master and on ZSA's fork (revb, with ZSA's defaults module for its keycodes), at the builder's pinned commits. Checked locally in the pinned qmk_cli image: both build.
- CI runs it for v* tags and when started by hand, in qmk_cli pinned by digest, not latest.
- RELEASING.md: tag only main, after the changelog; a failed tag is deleted, never moved; then bump KEYBARS_QMK_REF in the builder.
- CHANGELOG.md starts with v0.1.0-beta.1.

Based on #1; merge that first.

Reviewed-on: #2
jwarykowski deleted branch feat/module 2026-11-01 13:01:28 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jwarykowski/keybars-qmk!1
No description provided.