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:
1 parent
abb4890e8a
commit
64f60fe4e8
12 files changed
+120
-18
No files matched your search
@@ -8,6 +8,7 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"log/slog"
|
||||
"time"
|
||||
|
||||
"git.stormux.org/storm/cthulhu/internal/tentacle"
|
||||
@@ -43,7 +44,7 @@ func (err *remoteSpeechStreamError) Unwrap() error { return err.cause }
|
||||
// The caller supplies original-lease policy and optional local-output admission.
|
||||
func run_remote_speech_playback(ctx context.Context, speaker *configuredSpeaker,
|
||||
incoming <-chan tentacle.RemoteSpeechDelivery, allow func(tentacle.RemoteSpeechDelivery) bool,
|
||||
admit remoteSpeechAdmission) error {
|
||||
admit remoteSpeechAdmission, logger *slog.Logger) error {
|
||||
if speaker == nil || allow == nil {
|
||||
return errors.New("Remote speech playback requires a backend and delivery policy")
|
||||
}
|
||||
@@ -87,7 +88,17 @@ func run_remote_speech_playback(ctx context.Context, speaker *configuredSpeaker,
|
||||
if !allow(delivery) {
|
||||
return errors.New("Remote speech delivery policy changed")
|
||||
}
|
||||
return voice.SpeakUtteranceAndWait(request, utterance)
|
||||
if logger != nil && logger.Enabled(request, slog.LevelDebug) {
|
||||
for _, fragment := range utterance.fragments {
|
||||
logger.DebugContext(request, "delivering remote speech", "utterance", fragment.Text,
|
||||
"characters", fragment.Characters, "language", fragment.Language, "priority", utterance.priority)
|
||||
}
|
||||
}
|
||||
err := voice.SpeakUtteranceAndWait(request, utterance)
|
||||
if err != nil && request.Err() == nil && logger != nil {
|
||||
logger.Debug("remote speech rendering failed", "error", err)
|
||||
}
|
||||
return err
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user