Skip to content

MENU+L1 takes a screenshot and MENU+L2 locks, on every screen - #464

Open
tarikbc wants to merge 5 commits into
mainfrom
menu-keys
Open

tarikbc wants to merge 5 commits into
mainfrom
menu-keys

Conversation

@tarikbc

@tarikbc tarikbc commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

Outside a game there was no way to take a screenshot, and only MP4 could lock the handheld. Now, on any launcher screen (the home, a shelf, any menu, the in-game menu), MENU+L1 saves the screen and MENU+L2 locks.

How MENU works now

  • MENU opens on its release on both handhelds. The Pixel 2's FUNCTION key already did (it is also MENU+VOL brightness), and MENU in a game always did. The Brick's MENU opened on its press; it now goes through plat_key (src/platform.c), as the keyboard and desk mode do. This costs a tap's length before the menu opens on the Brick, the same as on the Pixel 2.
  • A button pressed while MENU is held is MENU's chord only when it is one of the two chords' buttons. Then MENU opens nothing when it is let go. Every other press under MENU goes through as before.
  • The chords can never be START (MENU+START held is Home), SELECT, the d-pad or a volume key (MENU+VOL is the Pixel 2's brightness). L2+R2 (the Pixel 2's battery level) still works without MENU.
  • In a game nothing changes: MENU is Diatom's there, and the screenshot is the SELECT hotkey from Hotkeys. MENU+L1 in a DS game is still the DS's L.

The screenshot

The frame as it was drawn, read back at its present before the volume bar over it (plat_grab_frame), 1024 x 768 on both handhelds, written on a thread to Screenshots/ZyperOS/ZyperOS 2026-11-22 10.04.31.png (renamed into place when whole). The shutter plays as it is taken, then the same notice a game's screenshot gets ("Screenshot saved", "Screenshots/ZyperOS", the picture small) shows at the foot for 1.5 s. They show on the home's Screenshots group like a game's: newest first, named ZyperOS ("ZyperOS · today 10:04"), the group's lime as their color, A opens one full screen, X deletes it. The group reads Screenshots/ZyperOS beside the systems' folders, and is read again on the shelf's next pass after a shot is written.

The lock

It is MP4's lock (src/mp4lock.h) and its panel: the screen goes dark, every button but the volume keys is blocked, a press shows how to open it, and SELECT+START held unlocks with the bar filling. It draws over the theme's ground, since no screen is under it. Auto Off still turns the handheld off.

The settings

MENU > System > Hotkeys ends with a rule, the line "Everywhere but in a game:", and three rows:

  • Screenshot (MENU+L1) and Lock Screen (MENU+L2): A captures MENU and a button (MENU let go keeps it). A button the other one has asks One panel for every question with two answers #479's swap question (cq_text(CQ_HOTKEYS_SWAP), confirm_ask_over), as the SELECT hotkeys do: "Give MENU+L2 to Screenshot? Lock Screen has it now and moves to MENU+L1.", Cancel at the left with the cursor. Host shot hotkeys-menu-swap.
  • Hold to Unlock: 1, 2, 3 or 5 s, 2 s to start (MP4's hold until now). It is for this lock and MP4's.

A game's Controls tab does not show them. They are kept in the device database as menukeys.

The tutorial

The MENU lesson gets a note, "MENU+L1 takes a screenshot, MENU+L2 locks." (with the keys as Hotkeys has them), as the shoulders ride on Move Around and Music. The handheld lights MENU alone: with L1 and L2 lit too, it turned to show the shoulders and MENU's dots went out of sight (check-tour-shots refused it).

Checked

  • make check (CHECK_JOBS=4), after main with One panel for every question with two answers #479 was merged in (60e216b): all 275 checks passed.
  • New check-menukeys, in desk mode on a shelf: MENU+L1 writes one 1024 x 768 PNG to Screenshots/ZyperOS and MENU let go after it leaves the shelf as it was; MENU held alone opens nothing and MENU let go alone opens the menu; MENU+L2 locks; SELECT+START held 1 s keeps it locked and held past 2 s unlocks; the shelf takes presses after; the shot is on the home's Screenshots group as ZyperOS, opens and X deletes it from the card. Run 5 times after its last change: all passed.
  • check-hotkeys holds the table: defaults, the swap, START refused, Hold to Unlock's steps, what is kept and read back.
  • Host shots of the Screenshots group with a launcher shot and a game's (the home, the shelf, the list, the viewer); and on the Pixel 2 and the Brick: the Hotkeys list's new rows, the MENU capture, the lock panel, the notice over a shelf, and the tutorial's MENU lesson (on the Pixel 2 the note draws MENU as its dots glyph). New i18n shots: hotkeys-menu-keys, hotkeys-menu-capture, hotkeys-menu-capture-keys, menu-locked, menu-shot-notice.

To test on a device

src/device/pixel2.c and src/device/brick.c changed and I could only build them for the host. On both handhelds: MENU+L1 on the home, a shelf and inside MENU (one file each in Screenshots/ZyperOS, the notice, no menu opening); MENU alone still opens the menu as it is let go; MENU+VOL brightness and MENU+START home still work on the Pixel 2; MENU+L2 locks, SELECT+START unlocks; change Hold to Unlock and check MP4's lock follows it. On the Brick, check that MENU opening on release feels right.

Files another helper may touch

src/device/brick.c (MENU through plat_key, plat_grab_frame at the present's start, plat_menu_forget in the flush) and src/device/pixel2.c (the chords under FUNCTION). The Brick's present and input are also in the Brick helper's area.

Outside a game there was no way to take a screenshot, and only MP4 could
lock the handheld. Now, on any launcher screen (the home, a shelf, any
menu, the in-game menu), MENU held and L1 pressed saves the screen, and
MENU held and L2 pressed locks.

MENU opens on its release on both handhelds now: the Pixel 2's FUNCTION
always did (it is the brightness chord's too), and so does MENU in a
game. The Brick's MENU opened on its press; it now goes through
plat_key, as the keyboard and desk mode do. A button pressed while MENU
is held is MENU's chord only when the launcher takes it (the two chords'
buttons), and MENU then opens nothing; every other press under MENU goes
through as before. Never START (MENU+START is Home), SELECT, the d-pad
or a volume key. In a game nothing changes: MENU is Diatom's there, and
the screenshot is the SELECT hotkey.

- The screenshot is the frame as drawn, read back at its present before
  the volume bar (plat_grab_frame), 1024 x 768, written on a thread to
  Screenshots/ZyperOS/ZyperOS <date>.png, with the shutter and a game's
  "Screenshot saved" notice over the screen.
- The lock is MP4's lock (src/mp4lock.h) and its panel: dark, every
  button blocked but the volume, SELECT+START held to unlock.
- MENU > System > Hotkeys ends with Screenshot and Lock Screen (A
  captures MENU and a button, with the swap question) and Hold to
  Unlock, 1, 2, 3 or 5 s, which MP4's lock uses too.
- The tutorial's MENU lesson says both as its note and lights the keys.

check-menukeys presses them in desk mode; check-hotkeys holds the table.
…sson lights MENU alone

menukeys_screen.c calls into main's files, so it is one of MAIN_SRC,
which the checks that link the rest of src/ leave out. With L1 and L2 lit
beside MENU, the tutorial's handheld turned to show the shoulders and
MENU's dots went out of sight (check-tour-shots): the lesson lights MENU
alone again and says the chords in its note.
A shot of a launcher screen went to Screenshots/ZyperOS, which the
Screenshots group did not read: it reads each system's folder. Now
shots_read reads Screenshots/ZyperOS too. Such a shot has no system, so
its owner is the group itself (its lime), its name and title are
ZyperOS, and the line under it says "ZyperOS · today 10:04". It sorts by
its time with the others (newest first), opens whole in the viewer and
X deletes it, as a game's shot.

The group is read again on the shelf's next pass after the shot is
written (shots_taken, as after a game), so it is there when the player
goes back to the home. check-menukeys now finds it on the group, opens
it and deletes it.
The Brick's evdev keys took main's d-pad and stick path, MENU's chords
through plat_key for the rest; and MENU's swap question for Screenshot
and Lock Screen is #479's: cq_text(CQ_HOTKEYS_SWAP) and
confirm_ask_over, as a game's hotkeys ask it, with the host shot
hotkeys-menu-swap.
tarikbc added a commit that referenced this pull request Nov 24, 2026
#464's own swap question (mk_swap_text on #479's panel) and its
check-menukeys fix replace this branch's (0e2b0dd, 7444bdc).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant