Help: Fn+h lists the keys of the screen you're on, and no screen names its keys any more (#69)
CI / build (pull_request) Successful in 7m22s
Site / build (pull_request) Successful in 14s

Fn+h on any screen, text fields included, and ? outside Text Entry, open a
panel over the content area: the screen's own keys, then the ones that work
everywhere. Every App declares its keys for the state it is in (pages,
viewers, dialogs and text fields answer for themselves); the App manager
opens the panel and takes every key while it is open.

About 30 hint lines are gone, from every App. What stays on a screen is
state. The first-start Setup keeps its hints and teaches the key; a device
set up before gets one Toast, once. The guide and the FAQ open with it.
`key help` over the consoles.

476 host tests (8 new). Checked on the device with key help and screenshots:
the Launcher, all nine Apps and several of their states. 8.5 KB of flash and
40 bytes of static RAM. Decisions Q196 to Q203 in docs/milestones/U1.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
This commit is contained in:
2026-10-07 01:29:51 +02:00
co-authored by Claude Opus 5.5
parent 1c6ae0e04f
commit 7fe8b3d22a
62 changed files with 855 additions and 81 deletions
+26 -6
View File
@@ -63,9 +63,9 @@ std::string FirmwarePage::latestText(bool& warn) const {
release::Release r;
if (g.status() == GiteaReleases::Status::Failed && !g.latest(r)) {
warn = true;
return "failed: Enter retries";
return "the check failed";
}
if (!g.latest(r)) return "Enter: check";
if (!g.latest(r)) return "not checked yet";
return r.tag + (release::isNewer(r, update_.runningVersion()) ? " (new)" : " (current)");
}
@@ -202,7 +202,7 @@ void FirmwarePage::drawRelease(Canvas& c) {
c.setFont(&fonts::small);
c.setTextDatum(top_left);
c.setTextColor(theme::kMuted);
c.drawString(ok ? "Enter: install c: check again" : (why + " c: check").c_str(), 4, area.y + area.h - 9);
if (!ok) c.drawString(why.c_str(), 4, area.y + area.h - 9); // why it can't be installed from here
}
void FirmwarePage::drawOlder(Canvas& c) {
@@ -232,9 +232,29 @@ void FirmwarePage::drawOlder(Canvas& c) {
return r.tag + (r.tag == running ? " (running)" : release::versionNewer(r.tag, running) ? " (new)" : "");
},
[&](int i) { return olderReleases_[i].date(); });
c.setFont(&fonts::small);
c.setTextColor(theme::kMuted);
c.drawString("Enter: details c: look again", 4, area.y + area.h - 9);
}
void FirmwarePage::help(std::vector<KeyHelp>& out) const {
if (confirm_) return help::dialog(out);
switch (view_) {
case View::Main:
help::list(out, "check, open, or install");
out.push_back({"c", "look for a newer release"});
break;
case View::Release:
out.push_back({"; .", "scroll"});
out.push_back({"Enter", "install it"});
out.push_back({"c", "check again"});
break;
case View::Older:
help::list(out, "its details");
out.push_back({"c", "read the list again"});
break;
}
}
const char* FirmwarePage::helpTitle() const {
return view_ == View::Release ? "A release" : view_ == View::Older ? "Older releases" : "Firmware";
}
void FirmwarePage::drawMain(Canvas& c) {