feat(agent): restore native keyboard platform on reconnect - #939
Draft
hornej wants to merge 1 commit into
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add an opt-in agent policy that restores a compatible keyboard's native host platform when it appears, reconnects, or resumes. The policy selects Windows on Windows, macOS on macOS, and Linux on Linux by resolving the device's advertised HID++
0x4531descriptors.The draft is Windows-validated. macOS build and repeated Windows-to-macOS KVM validation are still pending, so this PR is not ready for review yet.
Changes
openlogi-hidpp: add the function-3 host-platform setter and correct the capability/OS masks to the byte representation observed on MX Keys hardware.openlogi-device/openlogi-hid: resolve a requested OS through advertised descriptors, write the concrete current host slot, and verify the result with a readback.openlogi-agent-core/openlogi-agent: remember keyboard routes, revoke stale capture channels on topology changes, reserve a reconnect recovery window, and reapply the opt-in policy on reconnect and normal volatile-setting refreshes.openlogi-core/openlogi-ipc: add the configuration flag and append the new wire operation with protocol version 28.docs: documentapp_settings.enforce_native_keyboard_platform(defaultfalse).Testing
cargo fmt --all -- --checkRUSTFLAGS="-D warnings" cargo clippy --workspace --all-targets -- -D warningsRUSTFLAGS="-D warnings" cargo test --workspacecargo test -p openlogi-ipc --test wire_formatcargo check -p openlogi-hidpp -p openlogi-device --target wasm32-unknown-unknowncargo check -p openlogi-core --no-default-features --target wasm32-unknown-unknowntypos --config .config/typos.toml .cargo xtask release check-publishopenlogi-permissionsexcluded. The repository's exact Windows rustdoc command still fails on the unchangedPermissionStatus::Unknownlink inopenlogi-permissions; the same link is present onorigin/masterand the type is cfg-excluded on Windows.046d:c52b, slot 1. With the standalone helper executable disabled, repeated macOS-to-Windows KVM reconnects logged first-attempt Windows platform verification and independent HID++ readback reportedWindowswith software source. Normal shortcuts were physically verified after reconnect.The temporary Windows helper and macOS modifier mapping remain available as fallbacks until the macOS validation above passes.
Related to #521