Public Access
Screenshots: Fn+p on every screen (#83)
Fn+p saves the screen as it is to /screenshots, as the Shell's `screenshot` does, from anywhere: text fields, dialogs and the help panel included. The key never reaches an App. It refuses on Settings > Debug Console, which shows the token: a picture of that page is a copy of the token in a file (App::showsSecret). `key shot` presses it over the consoles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
This commit is contained in:
@@ -39,6 +39,10 @@ class App {
|
||||
|
||||
virtual void draw(Canvas& canvas) = 0;
|
||||
|
||||
// True while the screen shows something a picture of it shouldn't hold: the screenshot key
|
||||
// (Fn+p, issue #83) then refuses, and says so.
|
||||
virtual bool showsSecret() const { return false; }
|
||||
|
||||
// An App whose screen is costly to draw again (a picture decoded from the card, issue #45) can
|
||||
// keep what it drew: while this is true its part of the screen isn't cleared before draw(),
|
||||
// which then draws only what changed. contentLost() says that it was cleared after all, or
|
||||
|
||||
@@ -27,6 +27,7 @@ inline constexpr KeyHelp kEverywhere[] = {
|
||||
{"Fn `", "home, the Launcher"},
|
||||
{"; . , /", "arrows (Fn+ while typing)"},
|
||||
{"Fn h ?", "these keys (? not typing)"},
|
||||
{"Fn p", "a screenshot, on the card"},
|
||||
};
|
||||
|
||||
// dialog: A question
|
||||
|
||||
@@ -17,6 +17,7 @@ enum class Key : uint8_t {
|
||||
Tab,
|
||||
Delete,
|
||||
Help, // Fn+h anywhere, or ? outside Text Entry: the keys of this screen (issue #69)
|
||||
Screenshot, // Fn+p anywhere: the screen as a PNG on the card (issue #83). Never reaches an App
|
||||
};
|
||||
|
||||
struct KeyEvent {
|
||||
|
||||
@@ -106,6 +106,13 @@ void KeyMapper::onChar(char c, const RawKeys& keys, std::vector<KeyEvent>& out)
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case 'p':
|
||||
case 'P':
|
||||
if (keys.fn) { // Fn+p: a screenshot, while typing too
|
||||
out.push_back(KeyEvent::of(Key::Screenshot));
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case '?':
|
||||
if (!textEntry_ && !keys.fn) { // ? alone, when it wouldn't be typed
|
||||
out.push_back(KeyEvent::of(Key::Help));
|
||||
|
||||
Reference in New Issue
Block a user