Add "double-press to copy status" toggle + document the spoken-status changes (held for next release)

Preferences General-tab checkbox "Double-press the speak-status hotkey to copy the status to the
clipboard" (Alt+C), machine-wide (AppConfig.DoublePressStatusToCopy), on by default. When off, a
double press just reads the status again. SpeakStatusLine reads the flag only when the timing already
qualifies, so a normal single press never touches the config. Manual's speak-status section now
covers the line-by-line read, GB totals, and the double-press copy + its toggle.

Held for the next release.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Ednunp
2026-06-24 14:47:02 +01:00
co-authored by Claude Opus 4.8
parent 0fe9637356
commit be32a060e7
5 changed files with 35 additions and 5 deletions
+5 -2
View File
@@ -3360,13 +3360,16 @@ public sealed class MainForm : Form
private void SpeakStatusLine()
{
var now = DateTime.UtcNow;
var doublePress = now - lastSpeakStatusPressUtc <= TimeSpan.FromMilliseconds(600);
var withinDoublePressWindow = now - lastSpeakStatusPressUtc <= TimeSpan.FromMilliseconds(600);
lastSpeakStatusPressUtc = now;
var text = statusReadout.Text;
if (string.IsNullOrWhiteSpace(text)) text = "No status information available.";
if (doublePress)
// Double press copies to the clipboard — but only if the user has left that on (Preferences →
// General). Read the flag only when the timing already qualifies, so a normal single press never
// touches the config file.
if (withinDoublePressWindow && AppConfig.Load().DoublePressStatusToCopy)
{
// Second quick press: copy the status to the clipboard so it can be shared. Clipboard access
// needs the UI thread — this runs on it (the hotkey is marshalled onto the owner form).