Repository navigation
Keep Remote forwarding alive through unrelated keyboard removals - #1016
Merged
Merged
Conversation
Windows capture treated every keyboard removal as lost capture, and any local capture stop cancelled the Remote scanning session. A Bluetooth keyboard that reconnects every second or two therefore ended forwarding. Only interrupt capture on removal while a suppressed switch is held, and let local capture failures restart Remote scanning in place instead of ending the session. Escape and the local emergency hold still end it. Closes #1015 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cover a device removal during recovery quarantine, pin the order in which the Remote flag is read, and state that Remote ends when capture cannot be re-armed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #1015
Problem
Remote forwarding stopped unexpectedly on Windows. Diagnostic logging showed a paired Bluetooth LE HID device ("Grid Link") dropping and reconnecting every one to two seconds. Each drop sends
WM_INPUT_DEVICE_CHANGE/GIDC_REMOVAL. Capture treated that asCaptureLost, and any local captureStoppedevent calledremote_scan::cancel, which ended the Remote session.Changes
switch_input/windows_hook.rs: newState::device_removedinterrupts capture only while a suppressed switch is held (Shared::has_owned), the only case where a removal can strand a key. Called from the Raw Input device-change handler inswitch_input/windows.rs.scanning_runtime.rs: while Remote scanning is active, a local capture failure (CaptureLost,HeartbeatTimeout,QueueOverflow) resets the scanner but keeps the Remote session, so the next tick restarts Remote scanning in place. This is the same pattern as the Remote emergency-hold reset. Escape, the local emergency hold and disabling still end the session.docs/switches.mdanddocs/point-scan.mddescribe the new behaviour.Validation
npm run prediction-model,npm run lint,npm test(293 + 12 passed),npm run buildcargo fmt --check,cargo clippy --all-targets -- -D warningscargo test: 725 passed, including new testsdevice_removal_interrupts_only_while_a_switch_is_heldandonly_user_stops_end_remote_scanningGIDC_REMOVALforHID#{00001812-…}_77efbdaf2334&Col02, each followed by aCaptureLoststop.🤖 Generated with Claude Code