Honor Num Lock during Remote keyboard capture

Forward numeric keypad identities with Num Lock enabled and preserve held-key pairing across lock changes. Suppress local lock feedback during remote capture so it cannot interrupt incoming speech. Add debug speech and capture-end diagnostics, expand private keypad checks, and repair the suspension probe source list.

Validated affected Go packages, focused remote speech race checks, the private X11 Remote input harness, and a reader build. Live physical keyboard, audible PowerShell speech, Braille, and disconnect-cause verification remain pending; the active reader session was left running.
This commit is contained in:
ak47 committed 2026-11-07 22:37:39 -05:00
1 parent abb4890e8a
commit 64f60fe4e8
12 files changed
+120 -18

No files matched your search

+13 -1
View File
@@ -38,6 +38,12 @@ releases. `name` is a canonical unshifted key name from
repeats omit it so a layout change cannot strand a key. A full event queue
fails the session rather than losing a release.
Local Num Lock selects numeric keypad names (`KP_0`–`KP_9`, `KP_Decimal`)
instead of navigation names. Shift remains a separate key transition. A keypad
press retains its original identity through repeats and release even if Num Lock
changes while it is held. Numeric `KP_0` does not act as the reader's Insert
modifier; keypad Insert with Num Lock off still does.
Reader code attaches the mailbox with `Session.EnableRemoteCapture` and
publishes with `PublishRemoteInput` and `PublishRemoteFocus`; both require the
live controller `keyboard-capture` lease. Go exposes `RemoteCapturedKey`,
@@ -73,7 +79,13 @@ Ending releases every forwarded key through the stream, newest first, then
sends the end marker and closes the stream. Keys still physically held keep the
grab until their releases arrive, so no release reaches an application that
never saw the press. While capture is active the XRecord listener's local key
echo and speech interruption are suppressed.
echo, speech interruption and local lock-key announcements are suppressed.
The peer supplies its own lock feedback. Local lock tracking continues, and
announcements resume for subsequent changes after returning to local control.
Debug logs record capture-ending reasons and remote speech text handed to the
software speech backend, with spelling/language state and priority. Remote speech
text is omitted at ordinary log levels, as for other private reader output.
`start_remote_capture` attaches this owner for sessions installed with
`keyboard-capture`, from both local launch and managed startup. It enters