Allow keyboard interruption of i3 speech during terminal handoff

This commit is contained in:
ak47 committed 2026-11-07 15:16:26 -05:00
1 parent a29910d002
commit e7d02b1f62
9 files changed
+205 -8

No files matched your search

+12
View File
@@ -46,6 +46,18 @@ func processInputEvents(
}
if guarded, ok := speech.(gatedSpeech); ok && (guarded.gate.Locked() || guarded.gate.Suspended()) {
echo.Reset()
// Keep terminal echo and grabs delegated, but allow a selected key
// to stop local desktop speech explicitly admitted during handoff.
if !guarded.gate.Locked() {
interruption := input.InterruptionSettings{Mode: input.InterruptAllKeys}
if live != nil {
interruption = live.Load().SpeechInterruption
}
if interruption.ShouldInterrupt(event) && guarded.InterruptForInput(event) {
logger.Debug("queued desktop speech interrupted during terminal handoff",
"input_timestamp", event.Timestamp, "input_keycode", event.Keycode)
}
}
continue
}
if modal, ok := commands.(interface{ InternalUIEchoActive() bool }); ok && modal.InternalUIEchoActive() {