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
+39 -5
View File
@@ -413,7 +413,6 @@ void WifiSettingsPage::draw(Canvas& c) {
c.setTextColor(theme::kMuted);
c.drawString(editTitle_.c_str(), 4, area.y + 4);
widgets::lineEditor(c, editor_, {4, area.y + 22, area.w - 8, 0});
c.drawString("Enter: save `: cancel", 4, area.y + 44);
break;
}
@@ -427,7 +426,7 @@ void WifiSettingsPage::draw(Canvas& c) {
if (!n.ssid.empty()) found.push_back(n);
if (scan_.count() != static_cast<int>(found.size())) scan_.setCount(static_cast<int>(found.size()));
if (found.empty()) {
widgets::textLines(c, {"No networks found.", "", "`: back"}, 0, area);
widgets::textLines(c, {"No networks found."}, 0, area);
break;
}
widgets::list(
@@ -443,20 +442,55 @@ void WifiSettingsPage::draw(Canvas& c) {
std::string title = view_ == View::Ssid ? "Hidden network name" : "Password for " + newSsid_;
c.drawString(title.c_str(), 4, area.y + 4);
widgets::lineEditor(c, editor_, {4, area.y + 22, area.w - 8, 0});
c.drawString(view_ == View::Ssid ? "Enter: next `: cancel" : "Enter: save (empty = open) `: cancel", 4,
area.y + 44);
if (view_ == View::Password) c.drawString("Leave it empty for an open network.", 4, area.y + 44);
break;
}
}
}
void WifiSettingsPage::help(std::vector<KeyHelp>& out) const {
if (forgetDialog_) return help::dialog(out);
switch (view_) {
case View::Main:
help::list(out, "open, or change");
out.push_back({", /", "switch Wi-Fi on or off"});
break;
case View::Servers:
help::list(out, "edit");
out.push_back({", /", "Always use my DNS: on, off"});
break;
case View::Network:
help::list(out, "edit, or forget");
out.push_back({", /", "Automatic or Fixed"});
break;
case View::Details: out.push_back({"Enter", "back"}); break;
case View::Scan: help::list(out, "choose this network"); break;
case View::Ssid: help::textEntry(out, "next: the password"); break;
case View::Password:
case View::Edit: help::textEntry(out); break;
}
}
const char* WifiSettingsPage::helpTitle() const {
switch (view_) {
case View::Servers: return "DNS and NTP";
case View::Network: return "A saved network";
case View::Details: return "Wi-Fi status";
case View::Scan: return "Add a network";
case View::Ssid: return "Hidden network name";
case View::Password: return "Wi-Fi password";
case View::Edit: return "Wi-Fi: a field";
default: return "Wi-Fi";
}
}
// What the device is using and where each part came from (Q113).
void WifiSettingsPage::drawDetails(Canvas& c) {
const auto& area = theme::kContent;
WifiService::Connection n = wifi_.connection();
std::vector<std::string> lines;
if (!n.connected) {
lines = {statusText(), "", "`: back"};
lines = {statusText()};
} else {
lines.push_back(wifi_.ssid() + ", " + std::to_string(wifi_.rssi()) + " dBm");
lines.push_back("Address " + n.address + "/" + std::to_string(n.prefix) + (n.fixed ? " (fixed)" : " (DHCP)"));