Cthulhu is no longer a fork. Now it is a screen reader written in Golang.

This commit is contained in:
Storm Dragon committed 2026-10-14 00:16:34 -04:00
1 parent a998fe67de
commit 069fc674dc
708 files changed
+112482 -532

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
// Copyright (c) 2026 Storm Dragon
// Authors: Storm Dragon, Angus Kola
// SPDX-License-Identifier: GPL-3.0-or-later
package app
import "git.stormux.org/storm/cthulhu/internal/input"
// titleInputPolicy follows the latest accepted presentation, including the
// period after SPEAK returns while the synthesizer is still speaking it.
// Only automatic titles ignore repeats. Normal reading keeps its input policy.
// The speech worker's mutex owns this state.
type titleInputPolicy struct {
protectRepeats bool
}
func (policy *titleInputPolicy) observe(request speechRequest) {
policy.protectRepeats = request.Cause == "window-title" && request.Text != ""
}
func (policy *titleInputPolicy) preserves(event input.Event) bool {
return policy.protectRepeats && event.Repeat && event.Pressed &&
event.Name != "Control_L" && event.Name != "Control_R" && event.Name != "Escape"
}