feat(hid): support MX Mechanical extra controls - #1248
Conversation
1feacf6 to
6c0ac93
Compare
Greptile SummaryThis PR adds device-scoped HID++ bindings for the MX Mechanical’s Calculator, Show Desktop, Search, and Lock PC controls, while preserving native behavior when unbound.
Confidence Score: 5/5The PR appears safe to merge; no concrete blocking or independently actionable non-blocking issue remains. The new controls follow the established per-device persistence and capture path, model detection uses the firmware’s all-transport identifier set, IPC compatibility is versioned, and profile-specific tray routing matches packaged bundle identities.
|
| Filename | Overview |
|---|---|
| crates/openlogi-desktop/src/features/keyboard/function_row.rs | Maps MX Mechanical F16–F19 positions to per-device HID++ controls while retaining global bindings for unrelated keyboards. |
| crates/openlogi-desktop/src/features/keyboard/editors.rs | Generalizes editor commits across global and device targets and adds custom-shortcut text editing. |
| crates/openlogi-device/src/session/keyboard.rs | Extends the keyboard capture catalog with the MX Mechanical Calculator, Show Desktop, and Lock PC control IDs. |
| crates/openlogi-core/src/binding/button.rs | Appends three serialized button variants and exposes their labels and localization keys. |
| crates/openlogi-agent/src/tray.rs | Pins macOS deeplink delivery and running-GUI checks to the bundle matching the agent’s active profile. |
| crates/openlogi-ipc/src/ipc.rs | Bumps the strict IPC protocol version for the append-only serialized enum expansion. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
User[User selects MX Mechanical control] --> UI[Keyboard action picker]
UI --> Target{Binding target}
Target -->|Ordinary F-key| Global[Global keyboard binding]
Target -->|MX Mechanical extra control| Device[Per-device HID++ binding]
Device --> Config[Persist configuration]
Config --> Agent[Reload agent capture plan]
Agent --> HIDPP[Divert configured HID++ control]
HIDPP --> Action[Dispatch configured action]
Device -->|Action None| Native[Preserve firmware-native behavior]
Reviews (1): Last reviewed commit: "fix(tray): route commands to matching ap..." | Re-trigger Greptile
|
The only failing CI leg appears to be the macOS Intel test job. I reproduced the same failure locally with the x86_64 target in |
Summary
Add native HID++ support for the extra programmable controls on the full-size MX Mechanical keyboard.
The Calculator, Show Desktop, Search, and Lock PC positions can now be configured through OpenLogi while leaving unbound controls on their native firmware behavior.
This also fixes dev-profile tray commands opening the production OpenLogi GUI when both bundles register the
openlogi://URL scheme.Changes
core
KeyCalculator,KeyShowDesktop, andKeyLockPCas append-onlyButtonIdvariants.device
0x000a0x006e0x00d40x006fgui
F16 · Calculator Key.ipc
PROTOCOL_VERSIONfrom 29 to 30 for the appendedButtonIdvariants.i18n
agent
openerdependency.Testing
cargo fmt --all -- --checkRUSTFLAGS="-D warnings" cargo clippy --workspace --all-targets -- -D warningsRUSTFLAGS="-D warnings" cargo test --workspaceRUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --document-private-items --exclude openlogi-ui --exclude openlogi-desktop --exclude openlogi-overlay --exclude openlogi-agentcargo test -p openlogi-ipc --test wire_formatcargo test -p openlogi-ui localecargo test -p openlogi-desktop i18nHardware tested on a full-size MX Mechanical on macOS:
Ctrl+Alt+N— verifiedCtrl+Alt+L— verifiedScreenshots
F16 / Calculator with a custom shortcut:

F17 / Show Desktop with a custom shortcut:
